File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ export default class SessionService extends Service {
72
72
let { url } = await ajax ( `/api/private/session/begin` ) ;
73
73
win . location = url ;
74
74
75
- let event = await race ( [ waitForEvent ( window , 'message' ) , this . windowCloseWatcherTask . perform ( win ) ] ) ;
75
+ let event = await race ( [ this . windowEventWatcherTask . perform ( ) , this . windowCloseWatcherTask . perform ( win ) ] ) ;
76
76
if ( event . closed ) {
77
77
this . notifications . warning ( 'Login was canceled because the popup window was closed.' ) ;
78
78
return ;
@@ -111,6 +111,10 @@ export default class SessionService extends Service {
111
111
}
112
112
} ) ;
113
113
114
+ windowEventWatcherTask = task ( async ( ) => {
115
+ return await waitForEvent ( window , 'message' ) ;
116
+ } ) ;
117
+
114
118
windowCloseWatcherTask = task ( async window => {
115
119
// eslint-disable-next-line no-constant-condition
116
120
while ( true ) {
You can’t perform that action at this time.
0 commit comments