From d8a36d0198a427d3b6447128a3882287c0003413 Mon Sep 17 00:00:00 2001 From: Herrington Darkholme <2883231+HerringtonDarkholme@users.noreply.github.com> Date: Wed, 22 Sep 2021 00:37:51 +0800 Subject: [PATCH] fix(compiler-core): only merge true handlers (#4577) --- packages/compiler-core/src/transforms/transformElement.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-core/src/transforms/transformElement.ts b/packages/compiler-core/src/transforms/transformElement.ts index 2bc44e83..220db858 100644 --- a/packages/compiler-core/src/transforms/transformElement.ts +++ b/packages/compiler-core/src/transforms/transformElement.ts @@ -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