Skip to content

Commit

Permalink
chore: minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
edison1105 committed Feb 11, 2025
1 parent 985bec1 commit 7ef2e57
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/compiler-vapor/src/generators/expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,12 @@ function analyzeExpressions(expressions: SimpleExpressionNode[]) {
return this.skip()
}

// skip shorthand or non-computed property keys
if (
parent &&
parent.type === 'ObjectProperty' &&
parent.shorthand &&
parent.key === currentNode
parent.key === currentNode &&
(parent.shorthand || !parent.computed)
) {
return this.skip()
}
Expand Down

0 comments on commit 7ef2e57

Please sign in to comment.