From 02c75d4689fbe854ea614ecc6712a42527648dba Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 9 May 2024 08:53:35 -0500 Subject: [PATCH] fix nan check in system graphs --- web/src/components/graph/SystemGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/components/graph/SystemGraph.tsx b/web/src/components/graph/SystemGraph.tsx index 834f6e6b4..fbaacc729 100644 --- a/web/src/components/graph/SystemGraph.tsx +++ b/web/src/components/graph/SystemGraph.tsx @@ -145,7 +145,7 @@ export function ThresholdBarGraph({ } const getUnitSize = (MB: number) => { - if (isNaN(MB) || MB < 0) return "Invalid number"; + if (MB === null || isNaN(MB) || MB < 0) return "Invalid number"; if (MB < 1024) return `${MB.toFixed(2)} MiB`; if (MB < 1048576) return `${(MB / 1024).toFixed(2)} GiB`;