forked from Github/frigate
fix nan check in system graphs (#11312)
This commit is contained in:
@@ -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`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user