mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-29 06:28:50 +03:00
Fix: Prevent race condition in toast (#3443)
This commit is contained in:
parent
157cf47d38
commit
cda77c1a32
1 changed files with 12 additions and 10 deletions
|
@ -182,16 +182,18 @@ export default {
|
||||||
// Also toast
|
// Also toast
|
||||||
if (data.important) {
|
if (data.important) {
|
||||||
|
|
||||||
if (data.status === 0) {
|
if (this.monitorList[data.monitorID] !== undefined) {
|
||||||
toast.error(`[${this.monitorList[data.monitorID].name}] [DOWN] ${data.msg}`, {
|
if (data.status === 0) {
|
||||||
timeout: false,
|
toast.error(`[${this.monitorList[data.monitorID].name}] [DOWN] ${data.msg}`, {
|
||||||
});
|
timeout: false,
|
||||||
} else if (data.status === 1) {
|
});
|
||||||
toast.success(`[${this.monitorList[data.monitorID].name}] [Up] ${data.msg}`, {
|
} else if (data.status === 1) {
|
||||||
timeout: 20000,
|
toast.success(`[${this.monitorList[data.monitorID].name}] [Up] ${data.msg}`, {
|
||||||
});
|
timeout: 20000,
|
||||||
} else {
|
});
|
||||||
toast(`[${this.monitorList[data.monitorID].name}] ${data.msg}`);
|
} else {
|
||||||
|
toast(`[${this.monitorList[data.monitorID].name}] ${data.msg}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! (data.monitorID in this.importantHeartbeatList)) {
|
if (! (data.monitorID in this.importantHeartbeatList)) {
|
||||||
|
|
Loading…
Reference in a new issue