Skip to content

Commit

Permalink
fix: use desturcturing assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
dhlolo committed Sep 10, 2023
1 parent c80619f commit 687103a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,8 @@ export default function normalizeModuleAndLoadMetadata(
const { importsNamespace, imports } = metadata;
// If there is at least one namespace import and other imports, it may collipse with local ident, can be seen in issue 15879.
if (importsNamespace.size > 0 && imports.size === 0) {
// This is kind of gross. If we stop using `loose: true` we should
// just make this destructuring assignment.
metadata.name = importsNamespace.values().next().value;
const [name] = importsNamespace.values();
metadata.name = name;
}

const resolvedInterop = resolveImportInterop(
Expand Down

0 comments on commit 687103a

Please sign in to comment.