From 94586c918fbd7fad4469e14063cde9f193a2df2c Mon Sep 17 00:00:00 2001 From: Germain Date: Tue, 8 Nov 2022 14:44:54 +0000 Subject: [PATCH] Fix TimelineReset handling when no room associated (#9553) --- src/indexing/EventIndex.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/indexing/EventIndex.ts b/src/indexing/EventIndex.ts index c941b8aac1..060bea34b6 100644 --- a/src/indexing/EventIndex.ts +++ b/src/indexing/EventIndex.ts @@ -241,8 +241,8 @@ export default class EventIndex extends EventEmitter { * Listens for timeline resets that are caused by a limited timeline to * re-add checkpoints for rooms that need to be crawled again. */ - private onTimelineReset = async (room: Room, timelineSet: EventTimelineSet, resetAllTimelines: boolean) => { - if (room === null) return; + private onTimelineReset = async (room: Room | undefined) => { + if (!room) return; if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return; logger.log("EventIndex: Adding a checkpoint because of a limited timeline",