Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(runtime-core): ensure unmount dynamic components in optimized mode #11171

Merged
merged 3 commits into from
Jun 22, 2024

Conversation

jh-leong
Copy link
Member

@jh-leong jh-leong commented Jun 18, 2024

close #11168

The optimized mode's fast path skips the unmount process for dynamic component receiving an exting vnode with component children (component not in dynamicChildren), causing the onUnmounted hook to be missed, a simplified reproduction in playground.

Change:

  • Updated unmount logic to include a check for PatchFlags.BAIL to ensure components are unmounted correctly.

packages/runtime-core/src/renderer.ts Outdated Show resolved Hide resolved
@LinusBorg LinusBorg added the 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. label Jun 20, 2024
@yyx990803 yyx990803 merged commit 220fe24 into vuejs:main Jun 22, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

onUnmounted doesn't run if slot content is wrapped in a div (within this tab structure)
4 participants