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

Commit 94586c9

Browse files
author
Germain
authored
Fix TimelineReset handling when no room associated (#9553)
1 parent 3f3005a commit 94586c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/indexing/EventIndex.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ export default class EventIndex extends EventEmitter {
241241
* Listens for timeline resets that are caused by a limited timeline to
242242
* re-add checkpoints for rooms that need to be crawled again.
243243
*/
244-
private onTimelineReset = async (room: Room, timelineSet: EventTimelineSet, resetAllTimelines: boolean) => {
245-
if (room === null) return;
244+
private onTimelineReset = async (room: Room | undefined) => {
245+
if (!room) return;
246246
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return;
247247

248248
logger.log("EventIndex: Adding a checkpoint because of a limited timeline",

0 commit comments

Comments
 (0)