Skip to content

Commit

Permalink
make sure there's a ops.lastLoopTime before tring to clone it
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoncalabrese committed Dec 22, 2015
1 parent 78b770d commit f83dc67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins/openaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function statusLevel (ops, prefs, sbx) {

if (offlineMarker) {
console.info('OpenAPS known offline, not checking for alerts');
} else {
} else if (ops.lastLoopTime) {
var urgentTime = ops.lastLoopTime.clone().add(prefs.urgent, 'minutes');
var warningTime = ops.lastLoopTime.clone().add(prefs.warn, 'minutes');

Expand Down

0 comments on commit f83dc67

Please sign in to comment.