diff --git a/src/addon/mod/lesson/components/index/index.ts b/src/addon/mod/lesson/components/index/index.ts index 015434ce0..ada4eded7 100644 --- a/src/addon/mod/lesson/components/index/index.ts +++ b/src/addon/mod/lesson/components/index/index.ts @@ -535,6 +535,8 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo const preventReason = this.lessonProvider.getPreventAccessReason(this.accessInfo, true); if (preventReason) { this.preventMessages = [preventReason]; + } else { + this.preventMessages = []; } // Log view now that we have the password.