fix: beforeUpdate should not be called via onTrigger
This commit is contained in:
parent
232d14c0dd
commit
fc1d6e52f3
@ -1206,9 +1206,8 @@ export function createRenderer(options: RendererOptions) {
|
||||
}
|
||||
},
|
||||
{
|
||||
scheduler: queueUpdate,
|
||||
onTrigger:
|
||||
instance.beforeUpdate && instance.beforeUpdate.bind(instance.$proxy)
|
||||
scheduler: queueUpdate
|
||||
// TODO add API for using onTrigger for component re-render debugging
|
||||
}
|
||||
)
|
||||
|
||||
@ -1237,9 +1236,12 @@ export function createRenderer(options: RendererOptions) {
|
||||
container: RenderNode | null,
|
||||
isSVG: boolean
|
||||
) {
|
||||
// beforeUpdate is called as the onTrack hook of the instance's reactive
|
||||
// runner
|
||||
const prevVNode = instance.$vnode
|
||||
|
||||
if (instance.beforeUpdate) {
|
||||
instance.beforeUpdate.call(instance.$proxy, prevVNode)
|
||||
}
|
||||
|
||||
const nextVNode = (instance.$vnode = renderInstanceRoot(instance))
|
||||
container =
|
||||
container || parentNode(prevVNode.el as RenderNode | RenderFragment)
|
||||
|
Loading…
Reference in New Issue
Block a user