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 authored Jun 28, 2023
1 parent 5582cc5 commit ea64a6a
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 ea64a6a

Please sign in to comment.