Skip to content

Commit 1d35971

Browse files
committed
fix(compiler-core): correctly handle empty expression checks for v-bind shorthand
1 parent 5a8aa0b commit 1d35971

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ export const transformVBindShorthand: NodeTransform = (node, context) => {
1515
if (
1616
prop.type === NodeTypes.DIRECTIVE &&
1717
prop.name === 'bind' &&
18-
!prop.exp
18+
(!prop.exp ||
19+
(prop.exp.type === NodeTypes.SIMPLE_EXPRESSION && !prop.exp.content))
1920
) {
2021
const arg = prop.arg!
2122
if (arg.type !== NodeTypes.SIMPLE_EXPRESSION || !arg.isStatic) {

0 commit comments

Comments
 (0)