fix a stupid bug, please blame on vsc
parent
93c069c419
commit
0ac0f2e99a
|
|
@ -118,7 +118,7 @@ export default {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
// Then lastIncident here must not be undefined
|
// 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 })
|
const timeString = new Date().toLocaleString(config.dateLocale, { timeZone: config.timezone })
|
||||||
|
|
||||||
if (status.up) {
|
if (status.up) {
|
||||||
|
|
@ -132,7 +132,7 @@ export default {
|
||||||
// Current status is down
|
// Current status is down
|
||||||
// open new incident if not already open
|
// open new incident if not already open
|
||||||
if (lastIncident.end !== undefined) {
|
if (lastIncident.end !== undefined) {
|
||||||
incidentList.push({
|
state.incident[monitor.id].push({
|
||||||
start: [currentTimeSecond],
|
start: [currentTimeSecond],
|
||||||
end: undefined,
|
end: undefined,
|
||||||
error: [status.err]
|
error: [status.err]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue