Merge pull request #1120 from matrix-org/dbkr/infinite_spinner_email_reg

Fix infinite spinner on email registration
pull/21833/head
David Baker 2017-06-19 16:53:01 +01:00 committed by GitHub
commit 92cb394bac
1 changed files with 2 additions and 5 deletions

View File

@ -76,14 +76,11 @@ function createRoom(opts) {
}
];
let modal;
setTimeout(()=>{
modal = Modal.createDialog(Loader, null, 'mx_Dialog_spinner');
}, 0);
const modal = Modal.createDialog(Loader, null, 'mx_Dialog_spinner');
let roomId;
return client.createRoom(createOpts).finally(function() {
if (modal) modal.close();
modal.close();
}).then(function(res) {
roomId = res.room_id;
if (opts.dmUserId) {