From 47cefec5c9bfdb1d7627418bf60e9972edfd991b Mon Sep 17 00:00:00 2001 From: Michael Scovetta Date: Sat, 12 Feb 2022 07:45:30 -0800 Subject: [PATCH] esm: fix typo in `fetch_module` This PR fixes a minor typo in fetchModule's check for `[eval]` and `[stdin]` parent names. PR-URL: https://github.com/nodejs/node/pull/41924 Fixes: https://github.com/nodejs/node/issues/41922 Reviewed-By: Colin Ihrig Reviewed-By: Geoffrey Booth Reviewed-By: Luigi Pinca Reviewed-By: Mestery Reviewed-By: Benjamin Gruenbaum --- lib/internal/modules/esm/fetch_module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/modules/esm/fetch_module.js b/lib/internal/modules/esm/fetch_module.js index 288a202ea07372..3a273554b6b7af 100644 --- a/lib/internal/modules/esm/fetch_module.js +++ b/lib/internal/modules/esm/fetch_module.js @@ -267,7 +267,7 @@ function fetchModule(parsed, { parentURL }) { const parentName = path.basename(parent.pathname); if ( parentName === '[eval]' || - parentName === '[stdin' + parentName === '[stdin]' ) parent = 'command-line'; throw new ERR_NETWORK_IMPORT_DISALLOWED( href,