diff --git a/lib/client/careportal.js b/lib/client/careportal.js index bff59a821c0..e2cbe1c1208 100644 --- a/lib/client/careportal.js +++ b/lib/client/careportal.js @@ -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) { @@ -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; }