From af122082a9a56eeb8465d6b249903726b8c94829 Mon Sep 17 00:00:00 2001 From: Eternal-Rise Date: Fri, 16 Apr 2021 12:55:38 +0300 Subject: [PATCH] WIP: Remove useless parameter for Math.floor --- lib/units.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/units.js b/lib/units.js index 7220fd07..55a4c2ae 100644 --- a/lib/units.js +++ b/lib/units.js @@ -58,7 +58,7 @@ const bytesToSize = bytes => { if (bytes === 0) return '0'; const exp = Math.floor(Math.log(bytes) / Math.log(1000)); const size = bytes / 1000 ** exp; - const short = Math.round(size, 2); + const short = Math.round(size); const unit = SIZE_UNITS[exp]; return short + unit; };