From: iwusong Date: Tue, 12 Apr 2022 06:42:00 +0000 (+0800) Subject: fix(runtime-core): fix event listener as dynamicProp is added erroneously to props... X-Git-Tag: v3.2.32~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8eceabd14ebab2ba6523f920134b02fdf21e0a1c;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): fix event listener as dynamicProp is added erroneously to props (#5517) fix #5520 --- diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index 8c09903ecb..ad69160760 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -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) {