1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

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

This commit is contained in:
Michael Telatynski
2021-10-01 08:58:46 +01:00
parent 5eaf0e7e25
commit b84a0300aa

View File

@@ -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") {
// user's active space has gone away, go back to home
this.setActiveSpace(null, true);
}
};