]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-core): only merge true handlers (#4577)
authorHerrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com>
Tue, 21 Sep 2021 16:37:51 +0000 (00:37 +0800)
committerGitHub <noreply@github.com>
Tue, 21 Sep 2021 16:37:51 +0000 (12:37 -0400)
packages/compiler-core/src/transforms/transformElement.ts

index 2bc44e83980968e12eb26c07d3aded8cc00d4d57..220db858a63cba0ef815545c0710633e38383178 100644 (file)
@@ -807,7 +807,7 @@ function dedupeProperties(properties: Property[]): Property[] {
     const name = prop.key.content
     const existing = knownProps.get(name)
     if (existing) {
-      if (name === 'style' || name === 'class' || name.startsWith('on')) {
+      if (name === 'style' || name === 'class' || isOn(name)) {
         mergeAsArray(existing, prop)
       }
       // unexpected duplicate, should have emitted error during parse