fix(runtime-core): improve dedupe listeners when attr fallthrough (#4912)

fix #4859
This commit is contained in:
edison
2021-11-15 11:20:38 +08:00
committed by GitHub
parent 04e5835196
commit b4eb7e3866
2 changed files with 45 additions and 2 deletions

View File

@@ -791,7 +791,10 @@ export function mergeProps(...args: (Data & VNodeProps)[]) {
} else if (isOn(key)) {
const existing = ret[key]
const incoming = toMerge[key]
if (existing !== incoming) {
if (
existing !== incoming &&
!(isArray(existing) && existing.includes(incoming))
) {
ret[key] = existing
? [].concat(existing as any, incoming as any)
: incoming