From 28e3becf441c3f64099c57af7559defddcb69b02 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 10 Jun 2016 12:24:34 -0400 Subject: [PATCH] FIX: Allow authentication complete window to pop up --- .../discourse/initializers/auth-complete.js.es6 | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 b/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 index 779067362..9ce534315 100644 --- a/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 +++ b/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 @@ -5,12 +5,7 @@ export default { if (window.location.search.indexOf('authComplete=true') !== -1) { const lastAuthResult = localStorage.getItem('lastAuthResult'); if (lastAuthResult) { - try { - Discourse.authenticationComplete(JSON.parse(lastAuthResult)); - } catch(e) { - document.write(`

lastAuthResult: ${lastAuthResult}

`); - document.write(e); - } + Ember.run.next(() => Discourse.authenticationComplete(JSON.parse(lastAuthResult))); } } }