File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
packages/auth/src/core/util Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -43,9 +43,12 @@ export class FetchProvider {
43
43
if ( typeof self !== 'undefined' && 'fetch' in self ) {
44
44
return self . fetch ;
45
45
}
46
- if ( typeof globalThis !== 'undefined' && 'fetch' in globalThis ) {
46
+ if ( typeof globalThis !== 'undefined' && globalThis . fetch ) {
47
47
return globalThis . fetch ;
48
48
}
49
+ if ( typeof fetch !== 'undefined' ) {
50
+ return fetch ;
51
+ }
49
52
debugFail (
50
53
'Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill'
51
54
) ;
@@ -58,9 +61,12 @@ export class FetchProvider {
58
61
if ( typeof self !== 'undefined' && 'Headers' in self ) {
59
62
return self . Headers ;
60
63
}
61
- if ( typeof globalThis !== 'undefined' && 'Headers' in globalThis ) {
64
+ if ( typeof globalThis !== 'undefined' && globalThis . Headers ) {
62
65
return globalThis . Headers ;
63
66
}
67
+ if ( typeof Headers !== 'undefined' ) {
68
+ return Headers ;
69
+ }
64
70
debugFail (
65
71
'Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill'
66
72
) ;
@@ -73,9 +79,12 @@ export class FetchProvider {
73
79
if ( typeof self !== 'undefined' && 'Response' in self ) {
74
80
return self . Response ;
75
81
}
76
- if ( typeof globalThis !== 'undefined' && 'Response' in globalThis ) {
82
+ if ( typeof globalThis !== 'undefined' && globalThis . Response ) {
77
83
return globalThis . Response ;
78
84
}
85
+ if ( typeof Response !== 'undefined' ) {
86
+ return Response ;
87
+ }
79
88
debugFail (
80
89
'Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill'
81
90
) ;
You can’t perform that action at this time.
0 commit comments