diff --git a/calendar/js/et2_widget_event.js b/calendar/js/et2_widget_event.js index d3c7a4daf8..3836a51d97 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -171,7 +171,7 @@ var et2_calendar_event = /** @class */ (function (_super) { var value = event === null ? null : jQuery.extend({}, event); var parent = this.getParent(); var parent_owner = parent.getDOMNode(parent).dataset['owner'] || parent.getParent().options.owner; - if (parent_owner.indexOf(',')) { + if (parent_owner.indexOf(',') >= 0) { parent_owner = parent_owner.split(','); } // Make sure id is a string, check values diff --git a/calendar/js/et2_widget_event.ts b/calendar/js/et2_widget_event.ts index e768337673..c9d1a06f0c 100644 --- a/calendar/js/et2_widget_event.ts +++ b/calendar/js/et2_widget_event.ts @@ -211,7 +211,7 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached const value = event === null ? null : jQuery.extend({}, event); let parent = this.getParent(); let parent_owner = parent.getDOMNode(parent).dataset['owner'] || parent.getParent().options.owner; - if(parent_owner.indexOf(',')) + if(parent_owner.indexOf(',') >= 0) { parent_owner = parent_owner.split(','); }