From df5f5a0ff441496402c65f20857a5fee54bc3567 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 6 May 2020 11:31:54 -0600 Subject: [PATCH] Calendar: Fix some client side filter bugs - Resources could cause error for some owner checks --- 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 388832adbe..42fab5f947 100644 --- a/calendar/js/et2_widget_event.js +++ b/calendar/js/et2_widget_event.js @@ -755,7 +755,7 @@ var et2_calendar_event = /** @class */ (function (_super) { if (matching_participant.length > 0) { return this._status_check(event, filter, matching_participant); } - else if (filter == 'owner' && resource && resource.resources.indexOf(event.owner)) { + else if (filter == 'owner' && resource && resource.resources && resource.resources.indexOf(event.owner)) { // owner param was a group but event is owned by someone in that group return true; } diff --git a/calendar/js/et2_widget_event.ts b/calendar/js/et2_widget_event.ts index 3c45e634be..db0004823d 100644 --- a/calendar/js/et2_widget_event.ts +++ b/calendar/js/et2_widget_event.ts @@ -974,7 +974,7 @@ export class et2_calendar_event extends et2_valueWidget implements et2_IDetached { return this._status_check(event, filter, matching_participant); } - else if (filter == 'owner' && resource && resource.resources.indexOf(event.owner)) + else if (filter == 'owner' && resource && resource.resources && resource.resources.indexOf(event.owner)) { // owner param was a group but event is owned by someone in that group return true;