From a58a6275e595518f576335820cadc4691f560248 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Aug 2016 10:06:22 +0100 Subject: [PATCH] Just use _canceled Instead of both that and _unmounted --- src/components/views/dialogs/MultiInviteDialog.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/MultiInviteDialog.js b/src/components/views/dialogs/MultiInviteDialog.js index 62b66c6de9..a8d7aec495 100644 --- a/src/components/views/dialogs/MultiInviteDialog.js +++ b/src/components/views/dialogs/MultiInviteDialog.js @@ -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;