Check truthiness of space

This commit is contained in:
Jaiwanth 2021-05-05 13:01:14 +05:30
parent 73b9ad41da
commit bcd1005e3c

View file

@ -121,7 +121,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
*/
public async setActiveSpace(space: Room | null, contextSwitch = true) {
if (space && !space?.isSpaceRoom()) return;
if (space === this.activeSpace) {
if (space && space === this.activeSpace) {
const notificationState = this.getNotificationState(space.roomId);
if (notificationState.count) {
const roomId = notificationState.getRoomWithMaxNotifications();