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

Fix error about MessagePanel not being available for read markers #3867

Merged
merged 1 commit into from
Jan 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/structures/TimelinePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1136,7 +1136,9 @@ const TimelinePanel = createReactClass({
const messagePanel = this._messagePanel.current;
if (messagePanel === undefined) return null;

const wrapperRect = ReactDOM.findDOMNode(messagePanel).getBoundingClientRect();
const messagePanelNode = ReactDOM.findDOMNode(messagePanel);
if (!messagePanelNode) return null; // sometimes this happens for fresh rooms/post-sync
const wrapperRect = messagePanelNode.getBoundingClientRect();
const myUserId = MatrixClientPeg.get().credentials.userId;

const isNodeInView = (node) => {
Expand Down