diff --git a/src/core/features/courses/components/course-progress/course-progress.ts b/src/core/features/courses/components/course-progress/course-progress.ts index dff808d28..75f0b9ce3 100644 --- a/src/core/features/courses/components/course-progress/course-progress.ts +++ b/src/core/features/courses/components/course-progress/course-progress.ts @@ -140,17 +140,17 @@ export class CoreCoursesCourseProgressComponent implements OnInit, OnDestroy { * * @param e Click event. */ - prefetchCourse(e: Event): void { - e.preventDefault(); - e.stopPropagation(); + async prefetchCourse(e?: Event): Promise { + e?.preventDefault(); + e?.stopPropagation(); - /* @ todo try { - CoreCourseHelper.confirmAndPrefetchCourse(this.prefetchCourseData, this.course); + try { + await CoreCourseHelper.confirmAndPrefetchCourse(this.prefetchCourseData, this.course); } catch (error) { if (!this.isDestroyed) { CoreDomUtils.showErrorModalDefault(error, 'core.course.errordownloadingcourse', true); } - }*/ + } } /**