Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Petrov <[email protected]>
  • Loading branch information
mike-petrov committed Feb 5, 2024
1 parent ada8fa5 commit 6216013
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Components/TreeView/TreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]}`;
}
Expand Down

0 comments on commit 6216013

Please sign in to comment.