mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-15 09:21:02 +02:00
Fix defer promise logic
This commit is contained in:
parent
6dff4a4415
commit
d12b1903f2
@ -773,15 +773,16 @@ module.exports = React.createClass({
|
||||
// If the user is a ROU, allow them to transition to a PWLU
|
||||
if (cli.isGuest()) {
|
||||
const SetMxIdDialog = sdk.getComponent('views.dialogs.SetMxIdDialog');
|
||||
mxIdPromise = q.defer();
|
||||
const defered = q.defer();
|
||||
mxIdPromise = defered.promise;
|
||||
Modal.createDialog(SetMxIdDialog, {
|
||||
onFinished: (submitted, credentials) => {
|
||||
if (!submitted) {
|
||||
mxIdPromise.reject();
|
||||
defered.reject();
|
||||
return;
|
||||
}
|
||||
this.props.onRegistered(credentials);
|
||||
mxIdPromise.resolve();
|
||||
defered.resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user