fix a stupid bug, please blame on vsc

pull/5/head
lyc8503 2023-10-20 02:25:24 +08:00
parent 93c069c419
commit 0ac0f2e99a
1 changed files with 2 additions and 2 deletions

View File

@ -118,7 +118,7 @@ export default {
}
]
// Then lastIncident here must not be undefined
const lastIncident = incidentList.slice(-1)[0]
const lastIncident = state.incident[monitor.id].slice(-1)[0]
const timeString = new Date().toLocaleString(config.dateLocale, { timeZone: config.timezone })
if (status.up) {
@ -132,7 +132,7 @@ export default {
// Current status is down
// open new incident if not already open
if (lastIncident.end !== undefined) {
incidentList.push({
state.incident[monitor.id].push({
start: [currentTimeSecond],
end: undefined,
error: [status.err]