-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Multi-level-nested components breaks when top level is destroyed #625
Labels
Comments
bobslaede
changed the title
Multi-level-nested
Multi-level-nested components breaks when top level is destroyed
Jun 9, 2017
I have just tried this in an earlier version of Svelte, 1.21.0, and it did work in that version: https://svelte.technology/repl?version=1.21.0&gist=d0f22cc02f00b018d9e5529d935fc45a |
Rich-Harris
added a commit
that referenced
this issue
Jun 11, 2017
Unmount `yield` fragments in parent's unmount method, not destroy
This is fixed in 1.22.3 — thanks |
Thank you :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Having multiple levels of nested components, will break when destroying the top level.
If you have a wrapper component, inside of another component, and you destroy the top component it will break.
What happens is that it does destroy on one component, and that sets the reference to
null
, and then it tries to run.unmount()
on it afterwards.Example component:
Top component.html
Level1.html
Level2.html
Level3.html
Link to REPL:
https://svelte.technology/repl?version=1.22.2&gist=d0f22cc02f00b018d9e5529d935fc45a
The text was updated successfully, but these errors were encountered: