diff --git a/src/components/structures/TimelinePanel.tsx b/src/components/structures/TimelinePanel.tsx index fe7ecc8248..2592040f2a 100644 --- a/src/components/structures/TimelinePanel.tsx +++ b/src/components/structures/TimelinePanel.tsx @@ -798,7 +798,7 @@ class TimelinePanel extends React.Component { 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.