1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-10 05:42:29 +03:00

Fix TimelineReset handling when no room associated (#9553)

This commit is contained in:
Germain
2022-11-08 14:44:54 +00:00
committed by GitHub
parent 3f3005a3ca
commit 94586c918f

View File

@@ -241,8 +241,8 @@ export default class EventIndex extends EventEmitter {
* Listens for timeline resets that are caused by a limited timeline to * Listens for timeline resets that are caused by a limited timeline to
* re-add checkpoints for rooms that need to be crawled again. * re-add checkpoints for rooms that need to be crawled again.
*/ */
private onTimelineReset = async (room: Room, timelineSet: EventTimelineSet, resetAllTimelines: boolean) => { private onTimelineReset = async (room: Room | undefined) => {
if (room === null) return; if (!room) return;
if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return; if (!MatrixClientPeg.get().isRoomEncrypted(room.roomId)) return;
logger.log("EventIndex: Adding a checkpoint because of a limited timeline", logger.log("EventIndex: Adding a checkpoint because of a limited timeline",