From b84a0300aa69cd77d6b4b0aef6f758cceeed55bf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 1 Oct 2021 08:58:46 +0100 Subject: [PATCH] Fix leaving space via other client leaving you in undefined-land --- src/stores/SpaceStore.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/stores/SpaceStore.ts b/src/stores/SpaceStore.ts index 5f243a9d5d..4d54f5b553 100644 --- a/src/stores/SpaceStore.ts +++ b/src/stores/SpaceStore.ts @@ -608,6 +608,9 @@ export class SpaceStoreClass extends AsyncStoreWithClient { 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") { + // user's active space has gone away, go back to home + this.setActiveSpace(null, true); } };