FIX: Allow authentication complete window to pop up

This commit is contained in:
Robin Ward 2016-06-10 12:24:34 -04:00
parent 33a418d537
commit 28e3becf44

View file

@ -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(`<p>lastAuthResult: ${lastAuthResult}</p>`);
document.write(e);
}
Ember.run.next(() => Discourse.authenticationComplete(JSON.parse(lastAuthResult)));
}
}
}