Fix notif panel exception around accessing roomId of undefined (#9546)

pull/28217/head
Michael Telatynski 2022-11-04 16:40:02 +00:00 committed by GitHub
parent 5ca9accce2
commit be5a8ca3b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -798,7 +798,7 @@ class TimelinePanel extends React.Component<IProps, IState> {
if (this.unmounted) return;
// ignore events for other rooms
if (replacedEvent.getRoomId() !== this.props.timelineSet.room.roomId) return;
if (replacedEvent.getRoomId() !== this.props.timelineSet.room?.roomId) return;
// we could skip an update if the event isn't in our timeline,
// but that's probably an early optimisation.