We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 781d2d4 commit c1911aeCopy full SHA for c1911ae
packages/compiler-sfc/src/compileScript.ts
@@ -1347,8 +1347,8 @@ function walkObjectPattern(
1347
) {
1348
for (const p of node.properties) {
1349
if (p.type === 'ObjectProperty') {
1350
- // key can only be Identifier in ObjectPattern
1351
- if (p.key.type === 'Identifier') {
+ // key can be Identifier in ObjectPattern or StringLiteral
+ if (p.key.type === 'Identifier' || p.key.type === 'StringLiteral') {
1352
if (p.key === p.value) {
1353
// const { x } = ...
1354
const type = isDefineCall
0 commit comments