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

Commit 5040055

Browse files
authored
Merge pull request #2135 from matrix-org/dbkr/dont_crash_if_room_tag_value_null_2
Don't crash if the value of a room tag is null
2 parents aecddd5 + e3afbb1 commit 5040055

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/stores/RoomListStore.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ class RoomListStore extends Store {
284284
if (optimisticRequest && roomB === optimisticRequest.room) metaB = optimisticRequest.metaData;
285285

286286
// Make sure the room tag has an order element, if not set it to be the bottom
287-
const a = metaA.order;
288-
const b = metaB.order;
287+
const a = metaA ? metaA.order : undefined;
288+
const b = metaB ? metaB.order : undefined;
289289

290290
// Order undefined room tag orders to the bottom
291291
if (a === undefined && b !== undefined) {

0 commit comments

Comments
 (0)