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

Commit

Permalink
Fix room list sorted by recent on app startup (#9515)
Browse files Browse the repository at this point in the history
  • Loading branch information
Germain authored Oct 28, 2022
1 parent c497046 commit 750ca78
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const getLastTs = (r: Room, userId: string) => {

const threadLastEventTimestamps = r.getThreads().map(thread => {
const event = thread.replyToEvent ?? thread.rootEvent;
return event!.getTs();
return event?.getTs() ?? 0;
});

return Math.max(mainTimelineLastTs, ...threadLastEventTimestamps);
Expand Down

0 comments on commit 750ca78

Please sign in to comment.