Skip to content

Commit

Permalink
handle case of openaps: { iob: null,
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleibrand committed Sep 10, 2016
1 parent 437ba42 commit b6c2795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugins/iob.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function init() {
iobObj = _.isArray(devicestatusEntry.openaps.iob) ? devicestatusEntry.openaps.iob[0] : devicestatusEntry.openaps.iob;

// array could still be empty, handle as null
if (iobObj === undefined) {
if (iobObj === undefined || ! iobObj) {
return {};
}

Expand Down

0 comments on commit b6c2795

Please sign in to comment.