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 (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);
} }
}; };