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

Commit e3afbb1

Browse files
committed
Don't crash if the value of a room tag is null
We were checking that the order was not null, but not the object itself.
1 parent aecddd5 commit e3afbb1

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)