We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4668e9 commit eadb745Copy full SHA for eadb745
1 file changed
src/api/format.js
@@ -18,10 +18,10 @@ export function formatTimeZero(seconds) {
18
}
19
20
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";
+ if(bytes >= 1024*1024) {
+ return (bytes / (1024*1024)).toFixed(2) + " MB";
+ } else if(bytes >= 1024) {
+ return (bytes / 1024).toFixed(2) + " KB";
25
} else if(bytes === 0) {
26
return zeroValue;
27
0 commit comments