fix(runtime-core): fix event listener as dynamicProp is added erroneously to props (#5517)

fix #5520
This commit is contained in:
iwusong 2022-04-12 14:42:00 +08:00 committed by GitHub
parent b2b6b6ff62
commit 8eceabd14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -225,6 +225,10 @@ export function updateProps(
const propsToUpdate = instance.vnode.dynamicProps!
for (let i = 0; i < propsToUpdate.length; i++) {
let key = propsToUpdate[i]
// skip if the prop key is a declared emit event listener
if (isEmitListener(instance.emitsOptions, key)){
continue
}
// PROPS flag guarantees rawProps to be non-null
const value = rawProps![key]
if (options) {