From a8165d1707c0ae495f660074560fe1d9bf76d17d Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 19 Jun 2017 16:40:33 +0100 Subject: [PATCH] Fix infinite spinner on email registration Remove setTimeout on dialog display as it's no longer necessary and causes races. --- src/createRoom.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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() {