fix: incorrect status icons and counters caused by undefined !== null

This commit is contained in:
lyc8503 committed 2026-01-05 22:35:18 +08:00
1 parent 19852f15f7
commit da4bfb888d
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ export default function MonitorDetail({
)
let statusIcon =
state.incident[monitor.id].slice(-1)[0].end === undefined ? (
state.incident[monitor.id].slice(-1)[0].end === null ? (
<IconAlertCircle
style={{ width: '1.25em', height: '1.25em', color: '#b91c1c', marginRight: '3px' }}
/>
+1 -1
View File
@@ -12,7 +12,7 @@ function countDownCount(state: MonitorState, ids: string[]) {
continue
}
if (state.incident[id].slice(-1)[0].end === undefined) {
if (state.incident[id].slice(-1)[0].end === null) {
downCount++
}
}