Skip to content

Commit

Permalink
esm: fix typo in fetch_module
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
scovetta authored and danielleadams committed Apr 24, 2022
1 parent ce15007 commit 47cefec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/fetch_module.js
Expand Up @@ -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,
Expand Down

0 comments on commit 47cefec

Please sign in to comment.