File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
packages/auth/src/core/util Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,9 @@ 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 ) {
47
+ return globalThis . fetch ;
48
+ }
46
49
debugFail (
47
50
'Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill'
48
51
) ;
@@ -55,6 +58,9 @@ export class FetchProvider {
55
58
if ( typeof self !== 'undefined' && 'Headers' in self ) {
56
59
return self . Headers ;
57
60
}
61
+ if ( typeof globalThis !== 'undefined' && 'Headers' in globalThis ) {
62
+ return globalThis . Headers ;
63
+ }
58
64
debugFail (
59
65
'Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill'
60
66
) ;
@@ -67,6 +73,9 @@ export class FetchProvider {
67
73
if ( typeof self !== 'undefined' && 'Response' in self ) {
68
74
return self . Response ;
69
75
}
76
+ if ( typeof globalThis !== 'undefined' && 'Response' in globalThis ) {
77
+ return globalThis . Response ;
78
+ }
70
79
debugFail (
71
80
'Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill'
72
81
) ;
You can’t perform that action at this time.
0 commit comments