don't crash if stats is null

This commit is contained in:
Josh Hawkins 2026-05-11 13:02:37 -05:00
parent 36fbff0061
commit 84d7c79a2d

View File

@ -450,7 +450,7 @@ export default function GeneralMetrics({
series[key] = { name: key, data: [] };
}
if (stats.temp !== undefined) {
if (stats?.temp !== undefined) {
hasValidGpu = true;
series[key].data.push({ x: statsIdx + 1, y: stats.temp });
}
@ -562,7 +562,7 @@ export default function GeneralMetrics({
series[key] = { name: key, data: [] };
}
if (stats.temp !== undefined) {
if (stats?.temp !== undefined) {
hasValidNpu = true;
series[key].data.push({ x: statsIdx + 1, y: stats.temp });
}