lib: stop installing webcrypto if no_browser_globals is true

Refs: https://github.com/nodejs/node/pull/41969#issuecomment-1039448684

PR-URL: https://github.com/nodejs/node/pull/41971
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Nitzan Uziely <linkgoron@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
This commit is contained in:
Mestery authored and Danielle Adams committed 2022-04-23 22:26:04 -04:00
1 parent 9946b9bceb
commit e80043fb61
1 file changed
+2 -1
+2 -1
View File
@@ -168,7 +168,8 @@ function setupFetch() {
// TODO(aduh95): move this to internal/bootstrap/browser when the CLI flag is
// removed.
function setupWebCrypto() {
if (!getOptionValue('--experimental-global-webcrypto')) {
if (process.config.variables.node_no_browser_globals ||
!getOptionValue('--experimental-global-webcrypto')) {
return;
}