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

Commit 8fc2444

Browse files
committed
Prevent error being thrown so that we can throw our own better one
1 parent 5025248 commit 8fc2444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stores/room-list/algorithms/Algorithm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class Algorithm extends EventEmitter {
211211
}
212212

213213
// When we do have a room though, we expect to be able to find it
214-
let tag = this.roomIdsToTags[val.roomId][0];
214+
let tag = this.roomIdsToTags[val.roomId]?.[0];
215215
if (!tag) throw new Error(`${val.roomId} does not belong to a tag and cannot be sticky`);
216216

217217
// We specifically do NOT use the ordered rooms set as it contains the sticky room, which

0 commit comments

Comments
 (0)