Skip to content

Commit 8c912ab

Browse files
RaisinTenbengl
authored andcommitted
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 fc649fa commit 8c912ab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/internal/bootstrap/pre_execution.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ function setupWarningHandler() {
149149

150150
// https://fetch.spec.whatwg.org/
151151
function setupFetch() {
152-
if (!getOptionValue('--experimental-fetch')) {
152+
if (process.config.variables.node_no_browser_globals ||
153+
!getOptionValue('--experimental-fetch')) {
153154
return;
154155
}
155156

0 commit comments

Comments
 (0)