Skip to content

Commit 1fbfdaf

Browse files
Don't crash with undefined room in processBeaconEvents() (#2500)
1 parent c4f7e4d commit 1fbfdaf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/client.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -8937,12 +8937,12 @@ export class MatrixClient extends TypedEventEmitter<EmittedEvents, ClientEventHa
89378937
}
89388938

89398939
public processBeaconEvents(
8940-
room: Room,
8940+
room?: Room,
89418941
events?: MatrixEvent[],
89428942
): void {
8943-
if (!events?.length) {
8944-
return;
8945-
}
8943+
if (!events?.length) return;
8944+
if (!room) return;
8945+
89468946
room.currentState.processBeaconEvents(events, this);
89478947
}
89488948

0 commit comments

Comments
 (0)