Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix leaving space via other client leaving you in undefined-land #6891

Merged
merged 2 commits into from
Oct 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/stores/SpaceStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,9 @@ 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" && room.roomId === this.activeSpace?.roomId) {
// user's active space has gone away, go back to home
this.setActiveSpace(null, true);
}
};

Expand Down