mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
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() {
|
||||
this._unmounted = true;
|
||||
this._canceled = true;
|
||||
}
|
||||
|
||||
_onCancel() {
|
||||
|
@ -90,7 +90,7 @@ export default class MultiInviteDialog extends React.Component {
|
|||
}
|
||||
|
||||
inviteToRoom(this.props.roomId, input).then(() => {
|
||||
if (this._unmounted) { return; }
|
||||
if (this._canceled) { return; }
|
||||
|
||||
this.setState((s) => {
|
||||
s.completionStates[nextIndex] = 'invited'
|
||||
|
@ -98,7 +98,7 @@ export default class MultiInviteDialog extends React.Component {
|
|||
});
|
||||
this._inviteMore(nextIndex + 1);
|
||||
}, (err) => {
|
||||
if (this._unmounted) { return; }
|
||||
if (this._canceled) { return; }
|
||||
|
||||
let errorText;
|
||||
let fatal = false;
|
||||
|
|
Loading…
Reference in a new issue