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

Fix infinite spinner on email registration
This commit is contained in:
David Baker 2017-06-19 16:53:01 +01:00 committed by GitHub
commit 92cb394bac

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) {