File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -274,10 +274,11 @@ class _UPClientProvider extends EventEmitter3<UPClientProviderEvents> {
274
274
* @returns The provider if it successfully connected or throws an error.
275
275
*/
276
276
async function testWindow ( up : Window | undefined | null , remote : UPClientProvider , options : UPClientProviderOptions ) : Promise < UPClientProvider > {
277
- const _up = up || ( typeof window !== 'undefined' ? window : undefined )
277
+ const _up = up || ( typeof window !== 'undefined' ? window . parent : undefined )
278
278
if ( ! _up ) {
279
279
throw new Error ( 'No UP found' )
280
280
}
281
+ clientLog ( 'test window' , _up , up )
281
282
return new Promise < UPClientProvider > ( ( resolve , reject ) => {
282
283
let timeout : number | NodeJS . Timeout = 0
283
284
const channel = new MessageChannel ( )
@@ -342,6 +343,7 @@ async function testWindow(up: Window | undefined | null, remote: UPClientProvide
342
343
async function findUP ( authURL : UPWindowConfig , remote : UPClientProvider , options : UPClientProviderOptions ) : Promise < UPClientProvider | undefined > {
343
344
const current = typeof window !== 'undefined' && window instanceof Window ? window . opener || window . parent : null
344
345
if ( current ) {
346
+ clientLog ( 'finding' , current , typeof window !== 'undefined' ? window : undefined )
345
347
const up = await testWindow ( current , remote , options )
346
348
if ( up ) {
347
349
return up
You can’t perform that action at this time.
0 commit comments