diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index cb04bd2e00..b1d05b523f 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -403,12 +403,12 @@ var et2_calendar_event = /** @class */ (function (_super) { if (this.options.value.category) { var cat = et2_createWidget('select-cat', { 'readonly': true }, this); cat.set_value(this.options.value.category); - var cat_label_1 = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : []; - if (typeof cat_label_1 != 'string') { + cat_label = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : []; + if (typeof cat_label != 'string') { cat.span.children().each(function () { - cat_label_1.push(jQuery(this).text()); + cat_label.push(jQuery(this).text()); }); - cat_label_1 = cat_label_1.join(', '); + cat_label = cat_label.join(', '); } cat.destroy(); } diff --git a/calendar/js/et2_widget_event.ts b/calendar/js/et2_widget_event.ts index 0ebbd749fb..b5f55fcf07 100644 --- a/calendar/js/et2_widget_event.ts +++ b/calendar/js/et2_widget_event.ts @@ -511,12 +511,12 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached '' + this.egw().lang('Time') + ':' + timespan : '' + this.egw().lang('Start') + ':' + start + ' ' + '' + this.egw().lang('End') + ':' + end; - let cat_label = ''; + let cat_label: (string | string[]) = ''; if(this.options.value.category) { const cat = et2_createWidget('select-cat', {'readonly': true}, this); cat.set_value(this.options.value.category); - let cat_label : (string | string[]) = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : []; + cat_label = this.options.value.category.indexOf(',') <= 0 ? cat.span.text() : []; if(typeof cat_label != 'string') { cat.span.children().each(function() {