diff --git a/packages/oauth/oauth_browser.js b/packages/oauth/oauth_browser.js index cb6525d865..d6c6526e3a 100644 --- a/packages/oauth/oauth_browser.js +++ b/packages/oauth/oauth_browser.js @@ -59,7 +59,7 @@ const openCenteredPopup = function(url, width, height) { const newwindow = window.open(url, 'Login', features); - if (typeof newwindow === 'undefined') { + if (newwindow || newwindow.closed) { // blocked by a popup blocker maybe? const err = new Error("The login popup was blocked by the browser"); err.attemptedUrl = url; @@ -70,4 +70,4 @@ const openCenteredPopup = function(url, width, height) { newwindow.focus(); return newwindow; -}; \ No newline at end of file +};