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 <[email protected]>
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • Loading branch information
scovetta committed Feb 12, 2022
1 parent dfacb80 commit 30c742f
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 30c742f

Please sign in to comment.