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

Commit 8f8d1f6

Browse files
authored
Null-guard for missing root event in thread panel (#7067)
1 parent 773b147 commit 8f8d1f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/structures/ThreadPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ const useFilteredThreadsTimelinePanel = ({
8181
// The proper list order should be top-to-bottom, like in social-media newsfeeds.
8282
filteredThreads.reverse().forEach(([id, thread]) => {
8383
const event = thread.rootEvent;
84-
if (timelineSet.findEventById(event.getId()) || event.status !== null) return;
84+
if (!event || timelineSet.findEventById(event.getId()) || event.status !== null) return;
8585
timelineSet.addEventToTimeline(
8686
event,
8787
timelineSet.getLiveTimeline(),

0 commit comments

Comments
 (0)