From 49dbd89afb3d1fedf1dea9313abaa60f6dcfcffb Mon Sep 17 00:00:00 2001 From: nathangray Date: Tue, 19 May 2020 09:02:03 -0600 Subject: [PATCH] Calendar: Fix bug preventing yearly planner from loading --- calendar/js/et2_widget_event.js | 2 +- calendar/js/et2_widget_event.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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(','); }