From 916b4a6036235a30a587fef17b14e1ec0b030763 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 22 Dec 2021 09:13:55 +0100 Subject: [PATCH] MOBILE-3833 myoverview: Fix empty courses --- .../block/myoverview/components/myoverview/myoverview.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/addons/block/myoverview/components/myoverview/myoverview.ts b/src/addons/block/myoverview/components/myoverview/myoverview.ts index 4d3a0bc78..9095dc2f1 100644 --- a/src/addons/block/myoverview/components/myoverview/myoverview.ts +++ b/src/addons/block/myoverview/components/myoverview/myoverview.ts @@ -303,6 +303,10 @@ export class AddonBlockMyOverviewComponent extends CoreBlockBaseComponent implem protected loadFilters( config?: Record, ): void { + if (!this.hasCourses) { + return; + } + this.textFilter = ''; const sampleCourse = this.allCourses[0];