Skip to content

Commit

Permalink
lib: stop installing fetch if no_browser_globals is true
Browse files Browse the repository at this point in the history
Fixes: nodejs#41816
Signed-off-by: Darshan Sen <raisinten@gmail.com>

PR-URL: nodejs#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>
  • Loading branch information
RaisinTen authored and bengl committed Feb 21, 2022
1 parent 81d697b commit 1f1198d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ function setupWarningHandler() {

// https://fetch.spec.whatwg.org/
function setupFetch() {
if (!getOptionValue('--experimental-fetch')) {
if (process.config.variables.node_no_browser_globals ||
!getOptionValue('--experimental-fetch')) {
return;
}

Expand Down

0 comments on commit 1f1198d

Please sign in to comment.