diff --git a/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 b/app/assets/javascripts/discourse/initializers/auth-complete.js.es6 index 77906736220..9ce53431563 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))); } } }