diff --git a/src/addon/mod/forum/components/index/index.ts b/src/addon/mod/forum/components/index/index.ts index 973b3efd7..b3a4209b6 100644 --- a/src/addon/mod/forum/components/index/index.ts +++ b/src/addon/mod/forum/components/index/index.ts @@ -475,9 +475,11 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom // If it's a new discussion in tablet mode, try to open it. if (isNewDiscussion && this.splitviewCtrl.isOn()) { - if (data.discussionId) { + if (data.discussionIds) { // Discussion sent to server, search it in the list of discussions. - const discussion = this.discussions.find((disc) => { return disc.discussion == data.discussionId; }); + const discussion = this.discussions.find((disc) => { + return data.discussionIds.indexOf(disc.discussion) >= 0; + }); if (discussion) { this.openDiscussion(discussion); }