diff --git a/packages/compiler-core/src/transforms/vBind.ts b/packages/compiler-core/src/transforms/vBind.ts index 1e5e37141..c82706c10 100644 --- a/packages/compiler-core/src/transforms/vBind.ts +++ b/packages/compiler-core/src/transforms/vBind.ts @@ -65,7 +65,7 @@ export const transformBind: DirectiveTransform = (dir, _node, context) => { arg.children.unshift(`(`) arg.children.push(`) || ""`) } else if (!arg.isStatic) { - arg.content = `${arg.content} || ""` + arg.content = arg.content ? `${arg.content} || ""` : `""` } // .sync is replaced by v-model:arg