We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent caeae1e commit 9d4a0bfCopy full SHA for 9d4a0bf
src/util.js
@@ -5,7 +5,9 @@ export default function getSize(size) {
5
const sizeTerra = sizeGb * sizeKb
6
7
if (size < sizeMb) {
8
- return (size / sizeKb).toFixed(0) + ' KB'
+ const calculatedSizeMb = (size / sizeKb).toFixed(0)
9
+ if (calculatedSizeMb <= 0) return size + ' B'
10
+ return calculatedSizeMb + ' KB'
11
} else if (size < sizeGb) {
12
return (size / sizeMb).toFixed(0) + ' MB'
13
} else if (size < sizeTerra) {
0 commit comments