diff --git a/src/stores/RoomListStore.js b/src/stores/RoomListStore.js index 0a0a39a450..6571e1590f 100644 --- a/src/stores/RoomListStore.js +++ b/src/stores/RoomListStore.js @@ -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) {