Skip to content

Commit eadb745

Browse files
Display file size units in capitals
1 parent f4668e9 commit eadb745

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/api/format.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export function formatTimeZero(seconds) {
1818
}
1919

2020
export function formatSize(zeroValue, bytes) {
21-
if(bytes > 1024*1024) {
22-
return (bytes / (1024*1024)).toFixed(2) + " mb";
23-
} else if(bytes > 1024) {
24-
return (bytes / (1024*1024)).toFixed(2) + " kb";
21+
if(bytes >= 1024*1024) {
22+
return (bytes / (1024*1024)).toFixed(2) + " MB";
23+
} else if(bytes >= 1024) {
24+
return (bytes / 1024).toFixed(2) + " KB";
2525
} else if(bytes === 0) {
2626
return zeroValue;
2727
}

0 commit comments

Comments
 (0)