mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-18 10:28:05 +00: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,6 +182,7 @@ export default {
|
|||
// Also toast
|
||||
if (data.important) {
|
||||
|
||||
if (this.monitorList[data.monitorID] !== undefined) {
|
||||
if (data.status === 0) {
|
||||
toast.error(`[${this.monitorList[data.monitorID].name}] [DOWN] ${data.msg}`, {
|
||||
timeout: false,
|
||||
|
@ -193,6 +194,7 @@ export default {
|
|||
} else {
|
||||
toast(`[${this.monitorList[data.monitorID].name}] ${data.msg}`);
|
||||
}
|
||||
}
|
||||
|
||||
if (! (data.monitorID in this.importantHeartbeatList)) {
|
||||
this.importantHeartbeatList[data.monitorID] = [];
|
||||
|
|
Loading…
Reference in a new issue