From e54a7f09977af7938f858ad04042bbcc531b587f Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 19 Jul 2021 09:36:25 +0100 Subject: [PATCH] Don't throw exception from setStickyRoom as it split-brains the RoomListStore --- src/stores/room-list/algorithms/Algorithm.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/stores/room-list/algorithms/Algorithm.ts b/src/stores/room-list/algorithms/Algorithm.ts index 8574f095d6..eb6ffe6dcf 100644 --- a/src/stores/room-list/algorithms/Algorithm.ts +++ b/src/stores/room-list/algorithms/Algorithm.ts @@ -124,7 +124,11 @@ export class Algorithm extends EventEmitter { * @param val The new room to sticky. */ public setStickyRoom(val: Room) { - this.updateStickyRoom(val); + try { + this.updateStickyRoom(val); + } catch (e) { + console.warn("Failed to update sticky room", e); + } } public getTagSorting(tagId: TagID): SortAlgorithm {