Skip to content

Commit

Permalink
fix: object computed property name parsing incorrect in template
Browse files Browse the repository at this point in the history
close #1176
  • Loading branch information
johnsoncodehk committed Apr 12, 2022
1 parent 8727630 commit f333d93
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vue-code-gen/src/transform.ts
Expand Up @@ -119,6 +119,10 @@ function walkIdentifiers(
else if (ts.isObjectLiteralExpression(node)) {
for (const prop of node.properties) {
if (ts.isPropertyAssignment(prop)) {
// fix https://github.com/johnsoncodehk/volar/issues/1176
if (ts.isComputedPropertyName(prop.name)) {
walkIdentifiers(ts, prop.name.expression, cb, localVars);
}
walkIdentifiers(ts, prop.initializer, cb, localVars);
}
// fix https://github.com/johnsoncodehk/volar/issues/1156
Expand Down

0 comments on commit f333d93

Please sign in to comment.