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 <raisinten@gmail.com> PR-URL: #41969 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Nitzan Uziely <linkgoron@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
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

Lines changed: 2 additions & 1 deletion
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)