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

Commit 750ca78

Browse files
author
Germain
authored
Fix room list sorted by recent on app startup (#9515)
1 parent c497046 commit 750ca78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stores/room-list/algorithms/tag-sorting/RecentAlgorithm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ const getLastTs = (r: Room, userId: string) => {
111111

112112
const threadLastEventTimestamps = r.getThreads().map(thread => {
113113
const event = thread.replyToEvent ?? thread.rootEvent;
114-
return event!.getTs();
114+
return event?.getTs() ?? 0;
115115
});
116116

117117
return Math.max(mainTimelineLastTs, ...threadLastEventTimestamps);

0 commit comments

Comments
 (0)