Update src/stores/SpaceStore.tsx

Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Jaiwanth 2021-05-11 11:01:28 +05:30 committed by GitHub
parent 14f94c3883
commit 07a952a1bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
* should not be done when the space switch is done implicitly due to another event like switching room.
*/
public async setActiveSpace(space: Room | null, contextSwitch = true) {
if (!space?.isSpaceRoom()) return;
if (space && !space.isSpaceRoom()) return;
if (space === this.activeSpace) {
const notificationState = this.getNotificationState(space ? space.roomId : HOME_SPACE);
if (notificationState.count) {