You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Null check node before we pass it to velocity
As presumably sometimes the node wasn't actually in the DOM for whatever reason, so don't propagate exceptions out into the app. Should fix https://github.com/vector-im/riot-web/issues/6515
This commit is contained in:
@@ -147,7 +147,7 @@ module.exports = React.createClass({
|
||||
// creating/destroying large numbers of elements"
|
||||
// (https://github.com/julianshapiro/velocity/issues/47)
|
||||
const domNode = ReactDom.findDOMNode(this.nodes[k]);
|
||||
Velocity.Utilities.removeData(domNode);
|
||||
if (domNode) Velocity.Utilities.removeData(domNode);
|
||||
}
|
||||
this.nodes[k] = node;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user