File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -32,8 +32,11 @@ type RejectedRecord = {|
32
32
33
33
type Record = PendingRecord | ResolvedRecord | RejectedRecord ;
34
34
35
+ declare var globalThis: any ;
36
+
35
37
// TODO: this is a browser-only version. Add a separate Node entry point.
36
- const nativeFetch = window . fetch ;
38
+ const nativeFetch = ( typeof globalThis !== 'undefined' ? globalThis : window )
39
+ . fetch ;
37
40
38
41
function getRecordMap ( ) : Map < string , Record > {
39
42
return unstable_getCacheForType ( createRecordMap ) ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ module.exports = {
15
15
WeakSet : true ,
16
16
Uint16Array : true ,
17
17
Reflect : true ,
18
+ globalThis : true ,
18
19
// Vendor specific
19
20
MSApp : true ,
20
21
__REACT_DEVTOOLS_GLOBAL_HOOK__ : true ,
You can’t perform that action at this time.
0 commit comments