diff --git a/src/stores/SpaceStore.tsx b/src/stores/SpaceStore.tsx index 5b087bb054..daa05af7cf 100644 --- a/src/stores/SpaceStore.tsx +++ b/src/stores/SpaceStore.tsx @@ -535,10 +535,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient { const parents = Array.from(this.parentMap.get(room.roomId) || []); parent = parents.find(p => this.matrixClient.getRoom(p)); } - if (parent) { - // don't trigger a context switch when we are switching a space to match the chosen room - this.setActiveSpace(parent, false); - } + // don't trigger a context switch when we are switching a space to match the chosen room + this.setActiveSpace(parent || null, false); } // Persist last viewed room from a space