mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 04:21:57 +03:00
Fix leaving space via other client leaving you in undefined-land
This commit is contained in:
parent
5eaf0e7e25
commit
b84a0300aa
1 changed files with 3 additions and 0 deletions
|
@ -608,6 +608,9 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
if (membership === "join" && room.roomId === RoomViewStore.getRoomId()) {
|
if (membership === "join" && room.roomId === RoomViewStore.getRoomId()) {
|
||||||
// if the user was looking at the space and then joined: select that space
|
// if the user was looking at the space and then joined: select that space
|
||||||
this.setActiveSpace(room, false);
|
this.setActiveSpace(room, false);
|
||||||
|
} else if (membership === "leave") {
|
||||||
|
// user's active space has gone away, go back to home
|
||||||
|
this.setActiveSpace(null, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue