mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
fix the doc for fspeed and hide if speed == 0
This commit is contained in:
parent
6d4cf138c8
commit
c81b1620ca
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue