FIX: If there's no `window.opener` use the localStorage method for login

This commit is contained in:
Robin Ward 2016-07-08 14:45:02 -04:00
parent cf574bc155
commit f7c303c82e
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@
// On facebook browser, just redirect and don't close
var ua = navigator.userAgent || navigator.vendor || window.opera;
if ((ua.indexOf("FBAN") > -1) || (ua.indexOf("FBAV") > -1)) {
if (!window.opener) {
localStorage.setItem('lastAuthResult', JSON.stringify(authResult));
window.location.href = '<%= Discourse.base_url.html_safe %>?authComplete=true';
} else {