Null-guard for missing root event in thread panel (#7067)
This commit is contained in:
parent
773b147a03
commit
8f8d1f6094
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ const useFilteredThreadsTimelinePanel = ({
|
||||||
// The proper list order should be top-to-bottom, like in social-media newsfeeds.
|
// The proper list order should be top-to-bottom, like in social-media newsfeeds.
|
||||||
filteredThreads.reverse().forEach(([id, thread]) => {
|
filteredThreads.reverse().forEach(([id, thread]) => {
|
||||||
const event = thread.rootEvent;
|
const event = thread.rootEvent;
|
||||||
if (timelineSet.findEventById(event.getId()) || event.status !== null) return;
|
if (!event || timelineSet.findEventById(event.getId()) || event.status !== null) return;
|
||||||
timelineSet.addEventToTimeline(
|
timelineSet.addEventToTimeline(
|
||||||
event,
|
event,
|
||||||
timelineSet.getLiveTimeline(),
|
timelineSet.getLiveTimeline(),
|
||||||
|
|
Loading…
Reference in a new issue