From 6e80f34547e21c946d177941faeb6e5f5053a4d6 Mon Sep 17 00:00:00 2001 From: Albert Gasset Date: Wed, 7 Aug 2019 12:11:12 +0200 Subject: [PATCH] MOBILE-3021 calendar: Fix filter events by course --- src/addon/calendar/providers/helper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/addon/calendar/providers/helper.ts b/src/addon/calendar/providers/helper.ts index 1a83ac4fe..00005972a 100644 --- a/src/addon/calendar/providers/helper.ts +++ b/src/addon/calendar/providers/helper.ts @@ -274,7 +274,7 @@ export class AddonCalendarHelperProvider { } // Show the event if it is from site home or if it matches the selected course. - return event.courseid === this.sitesProvider.getSiteHomeId() || event.courseid == courseId; + return event.course && (event.course.id == this.sitesProvider.getCurrentSiteHomeId() || event.course.id == courseId); } /**