Skip to content

Commit

Permalink
Fix rebase error with ESM interop (#5396)
Browse files Browse the repository at this point in the history
### Description

<!--
  ✍️ Write a short summary of your work.
  If necessary, include relevant screenshots.
-->

### Testing Instructions

<!--
  Give a quick description of steps to test your changes.
-->
  • Loading branch information
alexkirsz committed Jul 3, 2023
1 parent 12c4c41 commit 4f8ad69
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function instantiateModule(id: ModuleId, source: SourceInfo): Module {
}

module.loaded = true;
if (module.namespaceObject) {
if (module.namespaceObject && module.exports !== module.namespaceObject) {
// in case of a circular dependency: cjs1 -> esm2 -> cjs1
interopEsm(module.exports, module.namespaceObject);
}
Expand Down

0 comments on commit 4f8ad69

Please sign in to comment.