Skip to content

Commit 675330b

Browse files
committed
fix(compiler): warn against v-bind with empty attribute value
ref: #1128 (comment)
1 parent 6c2402a commit 675330b

File tree

1 file changed

+1
-1
lines changed
  • packages/compiler-core/src/transforms

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { CAMELIZE } from '../runtimeHelpers'
1010
export const transformBind: DirectiveTransform = (dir, node, context) => {
1111
const { exp, modifiers, loc } = dir
1212
const arg = dir.arg!
13-
if (!exp) {
13+
if (!exp || (exp.type === NodeTypes.SIMPLE_EXPRESSION && !exp.content)) {
1414
context.onError(createCompilerError(ErrorCodes.X_V_BIND_NO_EXPRESSION, loc))
1515
}
1616
// .prop is no longer necessary due to new patch behavior

0 commit comments

Comments
 (0)