Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
lib: stop installing fetch if no_browser_globals is true
Fixes: #41816
Signed-off-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
RaisinTen committed Feb 14, 2022
commit 6f7bae19c7ae0920b22107376ec7617c40ad1fd4
3 changes: 2 additions & 1 deletion lib/internal/bootstrap/pre_execution.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,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