Skip to content

Commit 8eceabd

Browse files
authoredApr 12, 2022
fix(runtime-core): fix event listener as dynamicProp is added erroneously to props (#5517)
fix #5520
1 parent b2b6b6f commit 8eceabd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎packages/runtime-core/src/componentProps.ts

+4
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@ export function updateProps(
225225
const propsToUpdate = instance.vnode.dynamicProps!
226226
for (let i = 0; i < propsToUpdate.length; i++) {
227227
let key = propsToUpdate[i]
228+
// skip if the prop key is a declared emit event listener
229+
if (isEmitListener(instance.emitsOptions, key)){
230+
continue
231+
}
228232
// PROPS flag guarantees rawProps to be non-null
229233
const value = rawProps![key]
230234
if (options) {

0 commit comments

Comments
 (0)
Please sign in to comment.