From c26da1bce6d1cfec21d8266abb5a8c4d8f44aca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 26 Mar 2021 07:58:09 +0100 Subject: [PATCH] Use this.activeSpace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/stores/SpaceStore.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stores/SpaceStore.tsx b/src/stores/SpaceStore.tsx index 453cccdc17..3d476f7077 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -491,8 +491,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient { switch (payload.action) { case "view_room": { // persist last viewed room from a space - const activeSpace = SpaceStore.instance.activeSpace; - const activeSpaceId = activeSpace?.roomId || LAST_VIEWED_ROOMS_HOME; + const activeSpaceId = this.activeSpace?.roomId || LAST_VIEWED_ROOMS_HOME; const lastViewedRooms = JSON.parse(window.localStorage.getItem(LAST_VIEWED_ROOMS)) || {}; lastViewedRooms[activeSpaceId] = payload.room_id;