From: 山吹色御守 <85992002+KazariEX@users.noreply.github.com> Date: Fri, 18 Jul 2025 07:56:01 +0000 (-0700) Subject: fix(compiler-core): transform empty `v-bind` dynamic argument content correctly ... X-Git-Tag: v3.5.18~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3af67e878790892f9d34cfea15d13625aabe733;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-core): transform empty `v-bind` dynamic argument content correctly (#12554) --- 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