Merge pull request #6878 from matrix-org/t3chguy/fix/19192

This commit is contained in:
Michael Telatynski 2021-09-29 15:10:54 +01:00 committed by GitHub
commit 7e47211d4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ const validOrder = (order: string): string | undefined => {
// For sorting space children using a validated `order`, `m.room.create`'s `origin_server_ts`, `room_id`
export const getChildOrder = (order: string, creationTs: number, roomId: string): Array<Many<ListIteratee<any>>> => {
return [validOrder(order), creationTs, roomId];
return [validOrder(order) ?? NaN, creationTs, roomId]; // NaN has lodash sort it at the end in asc
};
const getRoomFn: FetchRoomFn = (room: Room) => {