fix the doc for fspeed and hide if speed == 0
This commit is contained in:
parent
6d4cf138c8
commit
c81b1620ca
|
@ -82,11 +82,11 @@ Deluge.Formatters = {
|
||||||
/**
|
/**
|
||||||
* Formats a string to display a transfer speed utilizing {@link #size}
|
* Formats a string to display a transfer speed utilizing {@link #size}
|
||||||
*
|
*
|
||||||
* @param {Number} bytes the filesize in bytes
|
* @param {Number} bits the number of bits per second
|
||||||
* @return {String} formatted string with KiB, MiB or GiB units.
|
* @return {String} formatted string with KiB, MiB or GiB units.
|
||||||
*/
|
*/
|
||||||
speed: function(bits) {
|
speed: function(bits) {
|
||||||
return fsize(bits) + '/s'
|
return (!bits) ? '' : fsize(bits) + '/s';
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue