Fix null-guarding regression around reply_to_event dispatch (#8039)

This commit is contained in:
Michael Telatynski 2022-03-11 17:21:28 +00:00 committed by GitHub
parent 5262d5c315
commit 4b0df21b0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -844,7 +844,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
case 'reply_to_event':
if (!this.unmounted &&
this.state.searchResults &&
payload.event.getRoomId() === this.state.roomId &&
payload.event?.getRoomId() === this.state.roomId &&
payload.context === TimelineRenderingType.Search
) {
this.onCancelSearchClick();