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 bengl committed Feb 22, 2022
1 parent b0e8ccb commit 66c9565
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/modules/esm/fetch_module.js
Original file line number Diff line number Diff line change
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 66c9565

Please sign in to comment.