From d3af67e878790892f9d34cfea15d13625aabe733 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Fri, 18 Jul 2025 00:56:01 -0700 Subject: [PATCH] fix(compiler-core): transform empty `v-bind` dynamic argument content correctly (#12554) --- packages/compiler-core/src/transforms/vBind.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-core/src/transforms/vBind.ts b/packages/compiler-core/src/transforms/vBind.ts index 1e5e371418..c82706c10c 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 -- 2.47.2