diff --git a/src/addons/mod/forum/pages/discussion/discussion.page.ts b/src/addons/mod/forum/pages/discussion/discussion.page.ts index d4e1857a7..e85857e4a 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.page.ts +++ b/src/addons/mod/forum/pages/discussion/discussion.page.ts @@ -395,7 +395,7 @@ export class AddonModForumDiscussionPage implements OnInit, AfterViewInit, OnDes offlineReplies.push(reply); // Disable reply of the parent. Reply in offline to the same post is not allowed, edit instead. - posts[reply.parentid!].capabilities.reply = false; + onlinePostsMap[reply.parentid!].capabilities.reply = false; return; }), diff --git a/src/core/features/course/classes/activity-prefetch-handler.ts b/src/core/features/course/classes/activity-prefetch-handler.ts index 08b234392..4b58dc5eb 100644 --- a/src/core/features/course/classes/activity-prefetch-handler.ts +++ b/src/core/features/course/classes/activity-prefetch-handler.ts @@ -136,7 +136,7 @@ export class CoreCourseActivityPrefetchHandlerBase extends CoreCourseModulePrefe await this.setDownloaded(module.id, siteId, extra); } catch (error) { // Error prefetching, go back to previous status and reject the promise. - return this.setPreviousStatus(module.id, siteId); + await this.setPreviousStatus(module.id, siteId); throw error; }