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
commit 19d3913e06
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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