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
This commit is contained in:
David Baker 2018-08-23 15:06:08 +01:00 committed by GitHub
commit 504005512e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {