mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-27 16:54:04 +00:00
[Favicon] Prevent error when no heartbeat
This commit is contained in:
parent
b9dfcd1291
commit
a9efdabcec
1 changed files with 8 additions and 4 deletions
|
@ -310,7 +310,7 @@ export default {
|
|||
},
|
||||
|
||||
tagsVisible() {
|
||||
return this.config.statusPageTags
|
||||
return this.config.statusPageTags;
|
||||
},
|
||||
|
||||
logoClass() {
|
||||
|
@ -452,7 +452,11 @@ export default {
|
|||
const monitorHeartbeats = heartbeatList[currentId];
|
||||
const lastHeartbeat = monitorHeartbeats.at(-1);
|
||||
|
||||
if (lastHeartbeat) {
|
||||
return lastHeartbeat.status === 0 ? downMonitorsAmount + 1 : downMonitorsAmount;
|
||||
} else {
|
||||
return downMonitorsAmount;
|
||||
}
|
||||
}, 0);
|
||||
|
||||
favicon.badge(downMonitors);
|
||||
|
@ -519,9 +523,9 @@ export default {
|
|||
return {
|
||||
...monitor,
|
||||
tags: newState ? this.$root.monitorList[monitor.id].tags : []
|
||||
}
|
||||
};
|
||||
})
|
||||
}
|
||||
};
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue