Fixes day to day rendering crashing if data contains a Profile Switch event without a profile

This commit is contained in:
Sulka Haro
2018-10-29 22:41:41 +02:00
parent 834d5f9f6b
commit 0e306b8c99
+3 -1
View File
@@ -904,7 +904,9 @@ daytoday.report = function report_daytoday(datastorage,sorteddaystoshow,options)
if (treatment.cutting) {
text = sign + ' ' + client.profilefunctions.profileSwitchName(treatment.cutting) + ' ' + '►►►' + ' ' + client.profilefunctions.profileSwitchName(treatment.profile) + ' ' + sign;
} else {
text = sign + ' ' + client.profilefunctions.profileSwitchName(treatment.profile) + ' ' + sign;
if (treatment.profile) {
text = sign + ' ' + client.profilefunctions.profileSwitchName(treatment.profile) + ' ' + sign;
}
}
context.append('text')
.style('font-size', 12)