Skip to content

Commit

Permalink
Merge pull request #239 from iambumblehead/remove-duplicate-nextLoad-…
Browse files Browse the repository at this point in the history
…call

remove duplicate nextLoad call
  • Loading branch information
iambumblehead committed Sep 7, 2023
2 parents 2fc016c + 184266b commit d953587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# changelog

* 2.4.2 _tbd_
* [remove duplicate nextLoad call](https://github.com/iambumblehead/esmock/pull/239)
* 2.4.1 _Sep.07.2023_
* [detect null AND undefined](https://github.com/iambumblehead/esmock/pull/238) loader-resolved source defintions
* restore commented-out test affected by un-caught `undefined` source definitions
Expand Down
2 changes: 1 addition & 1 deletion src/esmockLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const load = async (url, context, nextLoad) => {
if (importedNames && importedNames.length) {
const nextLoadRes = await nextLoad(url, context)
if (!iscommonjsmoduleRe.test(nextLoadRes.format))
return nextLoad(url, context)
return nextLoadRes

// nextLoadRes.source sometimes 'undefined' and other times 'null' :(
const sourceIsNullLike = (
Expand Down

0 comments on commit d953587

Please sign in to comment.