Merge pull request #3867 from matrix-org/travis/fix-messagepanel-ref
Fix error about MessagePanel not being available for read markers
This commit is contained in:
commit
d35788476a
1 changed files with 3 additions and 1 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue