Skip to content

Commit 47cefec

Browse files
scovettadanielleadams
authored andcommitted
esm: fix typo in fetch_module
This PR fixes a minor typo in fetchModule's check for `[eval]` and `[stdin]` parent names. PR-URL: #41924 Fixes: #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>
1 parent ce15007 commit 47cefec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/modules/esm/fetch_module.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ function fetchModule(parsed, { parentURL }) {
267267
const parentName = path.basename(parent.pathname);
268268
if (
269269
parentName === '[eval]' ||
270-
parentName === '[stdin'
270+
parentName === '[stdin]'
271271
) parent = 'command-line';
272272
throw new ERR_NETWORK_IMPORT_DISALLOWED(
273273
href,

0 commit comments

Comments
 (0)