Merge pull request #1950 from albertgasset/MOBILE-3018
MOBILE-3018 forum: Fix error after creating discussionmain
commit
a6f7feed92
|
@ -475,9 +475,11 @@ export class AddonModForumIndexComponent extends CoreCourseModuleMainActivityCom
|
||||||
// If it's a new discussion in tablet mode, try to open it.
|
// If it's a new discussion in tablet mode, try to open it.
|
||||||
if (isNewDiscussion && this.splitviewCtrl.isOn()) {
|
if (isNewDiscussion && this.splitviewCtrl.isOn()) {
|
||||||
|
|
||||||
if (data.discussionId) {
|
if (data.discussionIds) {
|
||||||
// Discussion sent to server, search it in the list of discussions.
|
// 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) {
|
if (discussion) {
|
||||||
this.openDiscussion(discussion);
|
this.openDiscussion(discussion);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue