fix: incorrect status icons and counters caused by undefined !== null
parent
19852f15f7
commit
da4bfb888d
|
|
@ -29,7 +29,7 @@ export default function MonitorDetail({
|
||||||
)
|
)
|
||||||
|
|
||||||
let statusIcon =
|
let statusIcon =
|
||||||
state.incident[monitor.id].slice(-1)[0].end === undefined ? (
|
state.incident[monitor.id].slice(-1)[0].end === null ? (
|
||||||
<IconAlertCircle
|
<IconAlertCircle
|
||||||
style={{ width: '1.25em', height: '1.25em', color: '#b91c1c', marginRight: '3px' }}
|
style={{ width: '1.25em', height: '1.25em', color: '#b91c1c', marginRight: '3px' }}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function countDownCount(state: MonitorState, ids: string[]) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.incident[id].slice(-1)[0].end === undefined) {
|
if (state.incident[id].slice(-1)[0].end === null) {
|
||||||
downCount++
|
downCount++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue