Just use _canceled
Instead of both that and _unmounted
This commit is contained in:
parent
cab95f43ff
commit
a58a6275e5
1 changed files with 3 additions and 3 deletions
|
@ -43,7 +43,7 @@ export default class MultiInviteDialog extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this._unmounted = true;
|
this._canceled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
_onCancel() {
|
_onCancel() {
|
||||||
|
@ -90,7 +90,7 @@ export default class MultiInviteDialog extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
inviteToRoom(this.props.roomId, input).then(() => {
|
inviteToRoom(this.props.roomId, input).then(() => {
|
||||||
if (this._unmounted) { return; }
|
if (this._canceled) { return; }
|
||||||
|
|
||||||
this.setState((s) => {
|
this.setState((s) => {
|
||||||
s.completionStates[nextIndex] = 'invited'
|
s.completionStates[nextIndex] = 'invited'
|
||||||
|
@ -98,7 +98,7 @@ export default class MultiInviteDialog extends React.Component {
|
||||||
});
|
});
|
||||||
this._inviteMore(nextIndex + 1);
|
this._inviteMore(nextIndex + 1);
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
if (this._unmounted) { return; }
|
if (this._canceled) { return; }
|
||||||
|
|
||||||
let errorText;
|
let errorText;
|
||||||
let fatal = false;
|
let fatal = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue