diff --git a/CHANGELOG.md b/CHANGELOG.md index df837253..13fb1dd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/esmockLoader.js b/src/esmockLoader.js index 96af927b..b5f0024e 100644 --- a/src/esmockLoader.js +++ b/src/esmockLoader.js @@ -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 = (