Skip to content

Commit

Permalink
fix: local and exported will never be the same object (rollup/rol…
Browse files Browse the repository at this point in the history
  • Loading branch information
yhx-12243 committed Jan 21, 2024
1 parent 647cefd commit 816c056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/import-to-globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function writeSpecLocal(code, root, spec, name, tempNames) {
if (spec.local.name === localName) {
return;
}
if (spec.local === spec.exported) {
if (spec.local.start === spec.exported.start && spec.local.end === spec.exported.end) {
code.appendRight(spec.local.start, `${localName} as `);
} else {
code.overwrite(spec.local.start, spec.local.end, localName);
Expand Down

0 comments on commit 816c056

Please sign in to comment.