Merge pull request #4031 from nightscout/wip/fix-empty-profile

Fixes day to day rendering crashing if data contains a Profile Switch…
This commit is contained in:
Sulka Haro
2018-10-30 10:28:19 +02:00
committed by GitHub
+3
View File
@@ -899,6 +899,9 @@ daytoday.report = function report_daytoday(datastorage,sorteddaystoshow,options)
});
function appendProfileSwitch(context, treatment) {
if (!treatment.cutting && !treatment.profile) { return; }
var sign = treatment.first ? '▲▲▲' : '▬▬▬';
var text;
if (treatment.cutting) {