Skip to content

Commit

Permalink
fix: update
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchangtao committed Sep 26, 2024
1 parent 891f3ff commit 824f3ec
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/runtime-core/src/renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1429,9 +1429,9 @@ function baseCreateRenderer(
// #2458: deference mount-only object parameters to prevent memleaks
initialVNode = container = anchor = null as any
} else {
let { next, bu, u, parent, vnode, isDeactive } = instance
let { next, bu, u, parent, vnode } = instance

if (isDeactive) {
if (checkInstanceActivate(instance)) {
return
}

Expand Down Expand Up @@ -2546,6 +2546,17 @@ function locateNonHydratedAsyncRoot(
}
}

function checkInstanceActivate(instance: ComponentInternalInstance | null) {
while (instance) {
const { isDeactive } = instance
if (isDeactive) {
return true
}
instance = instance.parent
}
return false
}

export function invalidateMount(hooks: LifecycleHook): void {
if (hooks) {
for (let i = 0; i < hooks.length; i++)
Expand Down

0 comments on commit 824f3ec

Please sign in to comment.