Skip to content

Commit

Permalink
esm: mark importAssertions as required
Browse files Browse the repository at this point in the history
We already always specify a value, and failing to do so would likely be
a bug.

PR-URL: #46164
Reviewed-By: Geoffrey Booth <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
aduh95 authored and RafaelGSS committed Jan 20, 2023
1 parent e1c56ec commit fa3e0c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/internal/modules/esm/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -777,14 +777,14 @@ class ESMLoader {
* @param {string} originalSpecifier The specified URL path of the module to
* be resolved.
* @param {string} [parentURL] The URL path of the module's parent.
* @param {ImportAssertions} [importAssertions] Assertions from the import
* @param {ImportAssertions} importAssertions Assertions from the import
* statement or expression.
* @returns {{ format: string, url: URL['href'] }}
*/
async resolve(
originalSpecifier,
parentURL,
importAssertions = { __proto__: null },
importAssertions,
) {
const isMain = parentURL === undefined;

Expand Down

0 comments on commit fa3e0c8

Please sign in to comment.