Skip to content

Commit 04aa312

Browse files
committed
fix(runtime-core): fix event listener is added erroneously to instance's props
fix #5520
1 parent 5898629 commit 04aa312

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/runtime-core/src/componentProps.ts

+5
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,11 @@ export function updateProps(
224224
const propsToUpdate = instance.vnode.dynamicProps!
225225
for (let i = 0; i < propsToUpdate.length; i++) {
226226
let key = propsToUpdate[i]
227+
// if the prop key is a declared emit event listener.
228+
// use continue to skip this prop
229+
if (isEmitListener(instance.emitsOptions, key)){
230+
continue
231+
}
227232
// PROPS flag guarantees rawProps to be non-null
228233
const value = rawProps![key]
229234
if (options) {

0 commit comments

Comments
 (0)