From d71f2345fb01f0cfca1fdb9d546633e71908d9b6 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 28 Sep 2021 10:34:32 +0100 Subject: [PATCH] Null guard around the matrixClient in SpaceStore --- src/stores/SpaceStore.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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