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

Null check node before we pass it to velocity
pull/21833/head
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
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ module.exports = React.createClass({
// creating/destroying large numbers of elements" // creating/destroying large numbers of elements"
// (https://github.com/julianshapiro/velocity/issues/47) // (https://github.com/julianshapiro/velocity/issues/47)
const domNode = ReactDom.findDOMNode(this.nodes[k]); const domNode = ReactDom.findDOMNode(this.nodes[k]);
Velocity.Utilities.removeData(domNode); if (domNode) Velocity.Utilities.removeData(domNode);
} }
this.nodes[k] = node; this.nodes[k] = node;
}, },