diff --git a/src/createRoom.js b/src/createRoom.js index bf0c0fee1c..8f0f9bd148 100644 --- a/src/createRoom.js +++ b/src/createRoom.js @@ -76,10 +76,7 @@ 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() {