Text space switching behaviour and fix invalid space edge case

This commit is contained in:
Michael Telatynski 2021-04-24 11:32:55 +01:00
parent da46e90896
commit 98851f8e64
2 changed files with 55 additions and 3 deletions

View file

@ -113,7 +113,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
}
public async setActiveSpace(space: Room | null, contextSwitch = true) {
if (space === this.activeSpace) return;
if (space === this.activeSpace || (space && !space?.isSpaceRoom())) return;
this._activeSpace = space;
this.emit(UPDATE_SELECTED_SPACE, this.activeSpace);