Browse Source
Merge pull request #720 from bertyhell/bugfix/fix-error-on-first-hearthbeat
fix(monitor): safely get status of previous beat if first beat
Nuckerr/master
Louis Lam
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
server/model/monitor.js
|
@ -304,7 +304,7 @@ class Monitor extends BeanModel { |
|
|
|
|
|
|
|
|
let beatInterval = this.interval; |
|
|
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,
|
|
|
// Mark as important if status changed, ignore pending pings,
|
|
|
// Don't notify if disrupted changes to up
|
|
|
// Don't notify if disrupted changes to up
|
|
|