More unmounted guards in BugReportDialog
This commit is contained in:
parent
d8bf57edc5
commit
25907301a3
1 changed files with 10 additions and 6 deletions
|
@ -62,13 +62,17 @@ export default class BugReportDialog extends React.Component {
|
||||||
sendLogs: sendLogs,
|
sendLogs: sendLogs,
|
||||||
progressCallback: this._sendProgressCallback,
|
progressCallback: this._sendProgressCallback,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
if (!this._unmounted) {
|
||||||
this.setState({ busy: false, progress: null });
|
this.setState({ busy: false, progress: null });
|
||||||
this.props.onFinished(false);
|
this.props.onFinished(false);
|
||||||
|
}
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
|
if (!this._unmounted) {
|
||||||
this.setState({
|
this.setState({
|
||||||
busy: false, progress: null,
|
busy: false, progress: null,
|
||||||
err: `Failed to send report: ${err.message}`,
|
err: `Failed to send report: ${err.message}`,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue