Skip to content

Commit 625cfb9

Browse files
committed
fixed page overwrite issue
1 parent dc7019a commit 625cfb9

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

public/modules/breakout/groups.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,9 +1360,12 @@ modules["breakout/groups"] = class {
13601360
let [code] = await sendRequest("PUT", "lessons/breakout/groups/join?group=" + groupID, null, { session: this.parent.parent.session });
13611361
joinButton.removeAttribute("disabled");
13621362
if (code == 200) {
1363-
this.parent.parent.self.group = groupID;
1364-
let tileData = this.layout.tiles[groupID];
1365-
this.parent.openPage("primary", "breakout/group", { group: tileData.render, members: tileData.members }); //, memberSessions: this.layout.memberSessions
1363+
if (this.parent.currentGroupID != groupID) {
1364+
this.parent.currentGroupID = groupID;
1365+
this.parent.parent.self.group = groupID;
1366+
let tileData = this.layout.tiles[groupID];
1367+
this.parent.openPage("primary", "breakout/group", { group: tileData.render, members: tileData.members }); //, memberSessions: this.layout.memberSessions
1368+
}
13661369
}
13671370
return;
13681371
}
@@ -1371,8 +1374,11 @@ modules["breakout/groups"] = class {
13711374
let [code, body] = await sendRequest("POST", "lessons/breakout/groups/new", null, { session: this.parent.parent.session });
13721375
tile.removeAttribute("disabled");
13731376
if (code == 200) {
1374-
this.parent.parent.self.group = body._id;
1375-
this.parent.openPage("primary", "breakout/group", { groupID: body._id });
1377+
if (this.parent.currentGroupID != body._id) {
1378+
this.parent.currentGroupID = body._id;
1379+
this.parent.parent.self.group = body._id;
1380+
this.parent.openPage("primary", "breakout/group", { groupID: body._id });
1381+
}
13761382
}
13771383
return;
13781384
}

0 commit comments

Comments
 (0)