From 4344ff909714d6550f38acd28af253bcccef777f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Tue, 20 Apr 2021 13:31:50 +0200 Subject: [PATCH] Update src/stores/SpaceStore.tsx Co-authored-by: Michael Telatynski <7t3chguy@googlemail.com> --- 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 eeecbbeba1..290caba9d4 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -120,7 +120,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { // view last selected room from space const roomId = window.localStorage.getItem(getLastViewedRoomsStorageKey(this.activeSpace)); - if (roomId && this.matrixClient.getRoom(roomId).getMyMembership() === "join") { + if (roomId && this.matrixClient?.getRoom(roomId)?.getMyMembership() === "join") { defaultDispatcher.dispatch({ action: "view_room", room_id: roomId,