Fix "Component not mounted" error in FileActions

This commit is contained in:
Alex Liebowitz 2017-02-24 02:30:27 -05:00
parent 4494b8f117
commit 23a4ad09de

View file

@ -252,9 +252,11 @@ export let FileActions = React.createClass({
}); });
}, },
onFileInfoUpdate: function(fileInfo) { onFileInfoUpdate: function(fileInfo) {
this.setState({ if (this.isMounted) {
fileInfo: fileInfo, this.setState({
}); fileInfo: fileInfo,
});
}
}, },
componentDidMount: function() { componentDidMount: function() {
this._isMounted = true; this._isMounted = true;