Skip to content

Commit

Permalink
fix(bytestosize): remove extra parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloavf committed Mar 20, 2018
1 parent 7ead795 commit 678d2ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Common/Node/bytesToSize.js
Expand Up @@ -6,7 +6,7 @@ const bytesToSize = bytes => {
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']
if (bytes === 0) return 'n/a'
const i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)), 10)
if (i === 0) return `${bytes} ${sizes[i]})`
if (i === 0) return `${bytes} ${sizes[i]}`
return `${(bytes / 1024 ** i).toFixed(1)} ${sizes[i]}`
}

Expand Down

0 comments on commit 678d2ab

Please sign in to comment.