Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 20, 2023
1 parent 7d84488 commit 24606f4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ast/nodes/ImportExpression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,8 @@ function getDeterministicObjectDestructure(objectPattern: ObjectPattern): string
const variables: string[] = [];

for (const property of objectPattern.properties) {
if (property.type === 'RestElement') return;
if (property.computed) return;
if (property.key.type !== 'Identifier') return;
if (property.type === 'RestElement' || property.computed || property.key.type !== 'Identifier')
return;
variables.push((property.key as Identifier).name);
}

Expand Down

0 comments on commit 24606f4

Please sign in to comment.