Skip to content

Commit ecd1d8b

Browse files
committed
chore: tweaks
1 parent e446096 commit ecd1d8b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/compiler-core/src/transforms/transformVBindShorthand.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export const transformVBindShorthand: NodeTransform = (node, context) => {
2929
prop.exp = createSimpleExpression('', true, arg.loc)
3030
} else {
3131
const propName = camelize((arg as SimpleExpressionNode).content)
32-
if (validFirstIdentCharRE.test(propName[0])) {
32+
if (
33+
validFirstIdentCharRE.test(propName[0]) ||
34+
// allow hyphen first char for https://github.com/vuejs/language-tools/pull/3424
35+
propName[0] === '-'
36+
) {
3337
prop.exp = createSimpleExpression(propName, false, arg.loc)
3438
}
3539
}

0 commit comments

Comments
 (0)