commit 5ad54c8750eb0e93831681189e2a6734d3b9e209
parent 5759aa7a8a13cf2a9da3879295cc5c01c1d40fab
Author: Felicitus <felicitus@felicitus.org>
Date: Sun, 20 Dec 2015 18:29:01 +0100
Display 0 bytes if 0 is passed
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js b/src/PartKeepr/FrontendBundle/Resources/public/js/PartKeepr.js
@@ -617,7 +617,7 @@ PartKeepr.bytesToSize = function (bytes)
{
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes === 0) {
- return 'n/a';
+ return '0 Bytes';
}
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];