Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit e6bf67a

Browse files
authored
Fix joining a suggested room switching space away (#11347)
1 parent 2f2067e commit e6bf67a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/stores/spaces/SpaceStore.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
929929
this._suggestedRooms = this._suggestedRooms.filter((r) => r.room_id !== room.roomId);
930930
if (numSuggestedRooms !== this._suggestedRooms.length) {
931931
this.emit(UPDATE_SUGGESTED_ROOMS, this._suggestedRooms);
932+
// If the suggested room was present in the list then we know we don't need to switch space
933+
return;
932934
}
933935

934936
// if the room currently being viewed was just joined then switch to its related space

0 commit comments

Comments
 (0)