Skip to content

NVR with realtime local object detection for IP cameras

fix nan check in system graphs (#11312)

Josh Hawkins021ffb2437a5
diff --git a/web/src/components/graph/SystemGraph.tsx b/web/src/components/graph/SystemGraph.tsx
index 834f6e6b4e..fbaacc729c 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`;