Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint fixes
  • Loading branch information
guybedford committed May 20, 2022
commit 12696a5ecef3508713bf0f98f2e0a6ab84e00096
4 changes: 2 additions & 2 deletions lib/internal/modules/esm/fetch_module.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ function fetchModule(parsed, { parentURL }) {
/**
* Checks if the given canonical URL exists in the fetch cache
*
* @param {url} string
* @returns {in_cache} boolean
* @param {string} key
* @returns {boolean}
*/
function inFetchCache(key) {
return cacheForGET.has(key);
Expand Down
9 changes: 4 additions & 5 deletions lib/internal/modules/esm/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,11 @@ class ESMLoader {
const module = fetchModule(new url("https://github.com/nodejs/node/pull/43130/commits/url"), { parentURL: url });
if (typeof module?.resolvedHREF === 'string') {
return module.resolvedHREF;
} else {
// Internal error
throw new ERR_INTERNAL_ASSERTION(
`Base url for module ${url} not loaded.`
);
}
// Internal error
throw new ERR_INTERNAL_ASSERTION(
`Base url for module ${url} not loaded.`
);
} else {
// A custom loader was used instead of network-imports.
// Adding support for a response URL resolve return in custom loaders is
Expand Down