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

Commit

Permalink
Merge pull request #2133 from matrix-org/dbkr/dont_crash_if_room_tag_…
Browse files Browse the repository at this point in the history
…value_null

Don't crash if the value of a room tag is null
  • Loading branch information
dbkr committed Aug 23, 2018
2 parents 7190fa3 + cc08179 commit ee4df85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/stores/RoomListStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ class RoomListStore extends Store {
if (optimisticRequest && roomB === optimisticRequest.room) metaB = optimisticRequest.metaData;

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

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

0 comments on commit ee4df85

Please sign in to comment.