diff --git a/src/components/structures/ThreadView.tsx b/src/components/structures/ThreadView.tsx index 7509c64dd6..f21528cce6 100644 --- a/src/components/structures/ThreadView.tsx +++ b/src/components/structures/ThreadView.tsx @@ -186,8 +186,10 @@ export default class ThreadView extends React.Component { }, async () => { thread.emit(ThreadEvent.ViewThread); if (!thread.initialEventsFetched) { - const { nextBatch } = await thread.fetchInitialEvents(); - this.nextBatch = nextBatch; + const response = await thread.fetchInitialEvents(); + if (response?.nextBatch) { + this.nextBatch = response.nextBatch; + } } this.timelinePanel.current?.refreshTimeline();