-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Challenging Bug] Teleport cumulates its content when used with Suspense #4183
Labels
Comments
mini repro see playground cause is : function normalizeSuspenseSlot(s: any) {
//...
s = normalizeVNode(s)
if (block) {
+ after filter, dynamicChildren is an empty array.maybe should avoid set an empty array to dynamicChildren
s.dynamicChildren = block.filter(c => c !== s)
}
return s
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Version
vue 3.1.4
Reproduction link
https://github.com/dmx374/teleportbug
Steps to reproduce
If you have 2 layouts (LayoutA.vue, LayoutB.vue, see the reproduction repo) and one is using Suspense, then teleport cumulates its content instead of cleaning.
When you go back and forth between Index and About pages, multiple times (go to About, then Index, then About again and so on), the #modal target get cumulated.
To fix the bug:
What is expected?
Teleport should not cumulate its content. Remove Suspense in LayoutA (put slot instead) to see the expected normal behavior.
What is actually happening?
Teleport is cumulating things when using with Suspense
The text was updated successfully, but these errors were encountered: