diff --git a/src/renderer/utils/format-bytes.ts b/src/renderer/utils/format-bytes.ts index 5aa39072..b052b43b 100644 --- a/src/renderer/utils/format-bytes.ts +++ b/src/renderer/utils/format-bytes.ts @@ -1,8 +1,8 @@ const FORMAT = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; export const formatBytes = (bytes: number): string => { - if (!Number.isFinite(bytes) || isNaN(bytes) || bytes < 0) { - return `N/A ${FORMAT[0]}`; + if (!Number.isFinite(bytes) || isNaN(bytes) || bytes <= 0) { + return `0 ${FORMAT[0]}`; } const byteKBase = 1024;