diff --git a/src/core/course/providers/helper.ts b/src/core/course/providers/helper.ts index 73ac7e3a4..6bbc497a8 100644 --- a/src/core/course/providers/helper.ts +++ b/src/core/course/providers/helper.ts @@ -1083,7 +1083,7 @@ export class CoreCourseHelperProvider { } const sectionWithModules = sections.find((section) => { - return section.modules.length > 0; + return section.modules && section.modules.length > 0; }); if (!sectionWithModules || typeof sectionWithModules.modules[0].completion == 'undefined') { promises.push(this.courseProvider.getActivitiesCompletionStatus(course.id));