From 4a538340628fd6c82fe650785983dffdff90cfa2 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Fri, 16 Dec 2022 15:05:43 +0530 Subject: [PATCH] fix nan undefined shown on storage card --- src/utils/billing/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/billing/index.ts b/src/utils/billing/index.ts index 84308a074..b56a119bf 100644 --- a/src/utils/billing/index.ts +++ b/src/utils/billing/index.ts @@ -41,7 +41,7 @@ export function makeHumanReadableStorage( bytes: number, round: 'round-up' | 'round-down' = 'round-down' ): string { - if (bytes === 0) { + if (bytes <= 0) { return '0 MB'; } const i = Math.floor(Math.log(bytes) / Math.log(1024));