Skip to content

Commit 9f6ef61

Browse files
insignrstoenescu
authored andcommitted
Avoid errors when bytes is undefined (quasarframework#1579)
* Avoid errors when * Avoid errors when bytes in undefined
1 parent 7806ec1 commit 9f6ef61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const units = ['B', 'kB', 'MB', 'GB', 'TB', 'PB']
33
export function humanStorageSize (bytes) {
44
let u = 0
55

6-
while (Math.abs(bytes) >= 1024 && u < units.length - 1) {
6+
while (parseInt(bytes) >= 1024 && u < units.length - 1) {
77
bytes /= 1024
88
++u
99
}

0 commit comments

Comments
 (0)