fix: $emit should check for raw parent data for listeners
This commit is contained in:
parent
743a3c2567
commit
172b7f5cf7
@ -177,8 +177,10 @@ class InternalComponent {
|
||||
name: string,
|
||||
...payload: any[]
|
||||
): MountedComponent {
|
||||
const parentData =
|
||||
(this.$parentVNode && this.$parentVNode.data) || EMPTY_OBJ
|
||||
const parentListener =
|
||||
this.$props['on' + name] || this.$props['on' + name.toLowerCase()]
|
||||
parentData['on' + name] || parentData['on' + name.toLowerCase()]
|
||||
if (parentListener) {
|
||||
invokeListeners(parentListener, payload)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user