Skip to content

Commit 2590730

Browse files
committed
More unmounted guards in BugReportDialog
1 parent d8bf57e commit 2590730

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎src/components/views/dialogs/BugReportDialog.js‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,17 @@ export default class BugReportDialog extends React.Component {
6262
sendLogs: sendLogs,
6363
progressCallback: this._sendProgressCallback,
6464
}).then(() => {
65-
this.setState({ busy: false, progress: null });
66-
this.props.onFinished(false);
65+
if (!this._unmounted) {
66+
this.setState({ busy: false, progress: null });
67+
this.props.onFinished(false);
68+
}
6769
}, (err) => {
68-
this.setState({
69-
busy: false, progress: null,
70-
err: `Failed to send report: ${err.message}`,
71-
});
70+
if (!this._unmounted) {
71+
this.setState({
72+
busy: false, progress: null,
73+
err: `Failed to send report: ${err.message}`,
74+
});
75+
}
7276
});
7377
});
7478
}

0 commit comments

Comments
 (0)