diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-11-06 11:01:02 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-11-06 11:08:02 +0100 |
commit | c2d6ac53b2cbfb59bb9b34025ee1348c67340c39 (patch) | |
tree | 9dbcdf0f08139b454f11e79dd8c7eb13236657c3 /core/js | |
parent | 8f0269f1212774c0c4f4e887163664c0c02f9256 (diff) | |
download | nextcloud-server-c2d6ac53b2cbfb59bb9b34025ee1348c67340c39.tar.gz nextcloud-server-c2d6ac53b2cbfb59bb9b34025ee1348c67340c39.zip |
fix human filesize column header
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/js.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js index 2073fc4d4b7..87d0a172082 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -649,7 +649,7 @@ $.fn.filterAttr = function(attr_name, attr_value) { function humanFileSize(size) { var humanList = ['B', 'kB', 'MB', 'GB', 'TB']; // Calculate Log with base 1024: size = 1024 ** order - var order = Math.floor(Math.log(size) / Math.log(1024)); + var order = size?Math.floor(Math.log(size) / Math.log(1024)):0; // Stay in range of the byte sizes that are defined order = Math.min(humanList.length - 1, order); var readableFormat = humanList[order]; |