Merge pull request #1838 from matrix-org/dbkr/fix_velocity_exception

Null check node before we pass it to velocity
This commit is contained in:
Luke Barnard
2018-04-13 10:58:43 +01:00
committed by GitHub

View File

@@ -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;
},