Null guard around the matrixClient in SpaceStore

pull/21833/head
Michael Telatynski 2021-09-28 10:34:32 +01:00
parent b635d01779
commit d71f2345fb
1 changed files with 1 additions and 1 deletions

View File

@ -818,7 +818,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
}
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