Skip to content

Commit a82c1a1

Browse files
authored
lib: stop installing fetch if no_browser_globals is true
Fixes: #41816 Signed-off-by: Darshan Sen <[email protected]> PR-URL: #41969 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Nitzan Uziely <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Mestery <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 34cf563 commit a82c1a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/bootstrap/pre_execution.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ function setupWarningHandler() {
151151

152152
// https://fetch.spec.whatwg.org/
153153
function setupFetch() {
154-
if (!getOptionValue('--experimental-fetch')) {
154+
if (process.config.variables.node_no_browser_globals ||
155+
!getOptionValue('--experimental-fetch')) {
155156
return;
156157
}
157158

0 commit comments

Comments
 (0)