Check truthiness of space
This commit is contained in:
parent
73b9ad41da
commit
bcd1005e3c
1 changed files with 1 additions and 1 deletions
|
@ -121,7 +121,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
*/
|
*/
|
||||||
public async setActiveSpace(space: Room | null, contextSwitch = true) {
|
public async setActiveSpace(space: Room | null, contextSwitch = true) {
|
||||||
if (space && !space?.isSpaceRoom()) return;
|
if (space && !space?.isSpaceRoom()) return;
|
||||||
if (space === this.activeSpace) {
|
if (space && space === this.activeSpace) {
|
||||||
const notificationState = this.getNotificationState(space.roomId);
|
const notificationState = this.getNotificationState(space.roomId);
|
||||||
if (notificationState.count) {
|
if (notificationState.count) {
|
||||||
const roomId = notificationState.getRoomWithMaxNotifications();
|
const roomId = notificationState.getRoomWithMaxNotifications();
|
||||||
|
|
Loading…
Reference in a new issue