1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-12 10:13:46 +02:00

Merge pull request #720 from bertyhell/bugfix/fix-error-on-first-hearthbeat

fix(monitor): safely get status of previous beat if first beat
This commit is contained in:
Louis Lam 2021-10-16 17:34:44 +08:00 committed by GitHub
commit 9a60f69f66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,7 +304,7 @@ class Monitor extends BeanModel {
let beatInterval = this.interval;
let isImportant = Monitor.isImportantBeat(isFirstBeat, previousBeat.status, bean.status);
let isImportant = Monitor.isImportantBeat(isFirstBeat, previousBeat?.status, bean.status);
// Mark as important if status changed, ignore pending pings,
// Don't notify if disrupted changes to up