mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-29 16:41:16 +03:00
don't crash if stats is null
This commit is contained in:
parent
36fbff0061
commit
84d7c79a2d
@ -450,7 +450,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stats.temp !== undefined) {
|
if (stats?.temp !== undefined) {
|
||||||
hasValidGpu = true;
|
hasValidGpu = true;
|
||||||
series[key].data.push({ x: statsIdx + 1, y: stats.temp });
|
series[key].data.push({ x: statsIdx + 1, y: stats.temp });
|
||||||
}
|
}
|
||||||
@ -562,7 +562,7 @@ export default function GeneralMetrics({
|
|||||||
series[key] = { name: key, data: [] };
|
series[key] = { name: key, data: [] };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stats.temp !== undefined) {
|
if (stats?.temp !== undefined) {
|
||||||
hasValidNpu = true;
|
hasValidNpu = true;
|
||||||
series[key].data.push({ x: statsIdx + 1, y: stats.temp });
|
series[key].data.push({ x: statsIdx + 1, y: stats.temp });
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user