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 <cjihrig@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mestery <mestery@protonmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
This commit is contained in:
Michael Scovetta authored and Danielle Adams committed 2022-04-23 22:25:59 -04:00
1 parent ce15007fd7
commit 47cefec5c9
1 file changed
+1 -1
+1 -1
View File
@@ -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,