Skip to content

Commit

Permalink
Fix temporary target cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
sulkaharo committed Aug 18, 2020
1 parent 9b048dd commit b8e69d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/client/careportal.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ function init (client, $) {
if (data.eventType.indexOf('Temporary Target Cancel') > -1) {
data.duration = 0;
data.eventType = 'Temporary Target';
data.targetBottom = "";
data.targetTop = "";
}

if (data.eventType.indexOf('Combo Bolus') > -1) {
Expand All @@ -303,8 +305,11 @@ function init (client, $) {

let d = {};
Object.keys(data).forEach(function(key) {
if (data[key] != "" && data[key] != null) d[key] = data[key];
if (data[key] !== "" && data[key] !== null) {
d[key] = data[key]
}
});

return d;
}

Expand Down

0 comments on commit b8e69d9

Please sign in to comment.