Fix "Component not mounted" error in FileActions
This commit is contained in:
parent
4494b8f117
commit
23a4ad09de
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue