fix logic

This commit is contained in:
Michael Telatynski 2021-10-01 09:25:47 +01:00
parent b84a0300aa
commit 273a895caa

View file

@ -608,7 +608,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
if (membership === "join" && room.roomId === RoomViewStore.getRoomId()) {
// if the user was looking at the space and then joined: select that space
this.setActiveSpace(room, false);
} else if (membership === "leave") {
} else if (membership === "leave" && room.roomId === this.activeSpace?.roomId) {
// user's active space has gone away, go back to home
this.setActiveSpace(null, true);
}