fix not displaying nonzero share sizes
This commit is contained in:
parent
7894355647
commit
7f618db70a
@ -46,8 +46,8 @@ var fmtBytes = function(b) {
|
|||||||
|
|
||||||
var k = 1024;
|
var k = 1024;
|
||||||
var sizes = [' B', ' KiB', ' MiB', ' GiB', ' TiB'];
|
var sizes = [' B', ' KiB', ' MiB', ' GiB', ' TiB'];
|
||||||
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
var i = Math.floor(Math.log(b) / Math.log(k));
|
||||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(3)) + sizes[i];
|
return parseFloat((b / Math.pow(k, i)).toFixed(3)) + sizes[i];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user