refactor: make sure setupContext.emit always reference current emit on instance
This is dev only and for internal use by vue-test-utils.
This commit is contained in:
parent
4e54243189
commit
5968cff3a8
@ -517,7 +517,7 @@ function createSetupContext(instance: ComponentInternalInstance): SetupContext {
|
|||||||
return new Proxy(instance.slots, slotsHandlers)
|
return new Proxy(instance.slots, slotsHandlers)
|
||||||
},
|
},
|
||||||
get emit() {
|
get emit() {
|
||||||
return instance.emit
|
return (event: string, ...args: any[]) => instance.emit(event, ...args)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user