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

Commit 434ca89

Browse files
committed
fix LL test; review comments
1 parent 4ca5699 commit 434ca89

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Notifier.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ export const Notifier = {
377377
removed: boolean,
378378
data: IRoomTimelineData,
379379
) {
380-
if (!data.liveEvent) return; // on notify for new things, not old.
380+
if (!data.liveEvent) return; // only notify for new things, not old.
381381
if (!this.isSyncing) return; // don't alert for any messages initially
382382
if (ev.getSender() === MatrixClientPeg.get().getUserId()) return;
383383

@@ -437,6 +437,11 @@ export const Notifier = {
437437
}
438438
}
439439
const room = MatrixClientPeg.get().getRoom(roomId);
440+
if (!room) {
441+
// e.g we are in the process of joining a room.
442+
// Seen in the cypress lazy-loading test.
443+
return;
444+
}
440445

441446
const actions = MatrixClientPeg.get().getPushActionsForEvent(ev);
442447

0 commit comments

Comments
 (0)