Calendar: Fix some client side filter bugs

- Resources could cause error for some owner checks
This commit is contained in:
nathangray 2020-05-06 11:31:54 -06:00
parent 4d6a2cf1b1
commit df5f5a0ff4
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;