]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-core): transform empty `v-bind` dynamic argument content correctly ...
author山吹色御守 <85992002+KazariEX@users.noreply.github.com>
Fri, 18 Jul 2025 07:56:01 +0000 (00:56 -0700)
committerGitHub <noreply@github.com>
Fri, 18 Jul 2025 07:56:01 +0000 (15:56 +0800)
packages/compiler-core/src/transforms/vBind.ts

index 1e5e371418bc5ecfcc871270c6a173d359ec38d6..c82706c10c74f2f365e1d8b33b2515af29a84434 100644 (file)
@@ -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