fix the doc for fspeed and hide if speed == 0

This commit is contained in:
Damien Churchill 2010-02-19 20:22:37 +00:00
parent 6d4cf138c8
commit c81b1620ca
1 changed files with 2 additions and 2 deletions

View File

@ -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';
}, },
/** /**