diff --git a/src/stores/SpaceStore.tsx b/src/stores/SpaceStore.tsx index f28d279d00..d440c33c83 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -818,7 +818,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { } protected async onAction(payload: ActionPayload) { - if (!spacesEnabled) return; + if (!spacesEnabled || !this.matrixClient) return; switch (payload.action) { case "view_room": { // Don't auto-switch rooms when reacting to a context-switch