mirror of
https://github.com/element-hq/element-web
synced 2024-11-26 11:15:53 +03:00
Hopefully fix memory leak with velocity
This commit is contained in:
parent
07cc9bf77d
commit
ed835752bc
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,10 @@ module.exports = React.createClass({
|
||||||
this._updateChildren(this.props.children);
|
this._updateChildren(this.props.children);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
componentWillUnmount: function() {
|
||||||
|
this._updateChildren([]);
|
||||||
|
},
|
||||||
|
|
||||||
componentWillReceiveProps: function(nextProps) {
|
componentWillReceiveProps: function(nextProps) {
|
||||||
this._updateChildren(nextProps.children);
|
this._updateChildren(nextProps.children);
|
||||||
},
|
},
|
||||||
|
@ -106,6 +110,9 @@ module.exports = React.createClass({
|
||||||
});
|
});
|
||||||
|
|
||||||
//console.log("enter: "+JSON.stringify(node.props._restingStyle));
|
//console.log("enter: "+JSON.stringify(node.props._restingStyle));
|
||||||
|
} else if (node === null) {
|
||||||
|
// https://github.com/julianshapiro/velocity/issues/300
|
||||||
|
Velocity.Utilities.removeData(this.nodes[k]);
|
||||||
}
|
}
|
||||||
this.nodes[k] = node;
|
this.nodes[k] = node;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue