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) {
this.setState({
fileInfo: fileInfo,
});
if (this.isMounted) {
this.setState({
fileInfo: fileInfo,
});
}
},
componentDidMount: function() {
this._isMounted = true;