diff --git a/src/Components/TreeView/TreeView.js b/src/Components/TreeView/TreeView.js index 8ce6f94..9378d60 100644 --- a/src/Components/TreeView/TreeView.js +++ b/src/Components/TreeView/TreeView.js @@ -93,8 +93,8 @@ const Folder = ({ name, children }) => { function formatBytes(bytes) { const units = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; let i = 0 - for (i; bytes > 1000; i += 1) { - bytes /= 1000; + for (i; bytes >= 1024; i += 1) { + bytes /= 1024; } return `${bytes === 0 ? bytes : bytes.toFixed(1)} ${units[i]}`; }