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

pull/177/head
lyc8503 2026-01-05 22:35:18 +08:00
parent 19852f15f7
commit da4bfb888d
2 changed files with 2 additions and 2 deletions

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' }}
/>

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++
}
}