-
-
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
No parent node when detaching #3187
Comments
This seems similar to #3113. This is reproducible without Sapper, as follows: <!-- App.svelte -->
<script>
import Widget from './Widget.svelte';
let flag = false;
</script>
<input type='checkbox' bind:checked={flag}>
<svelte:component this={flag && Widget}/> <!-- Widget.svelte -->
<svelte:head>
<meta value='hey'>
</svelte:head> This does seem like a bug in Svelte. I don't think the correct solution will be to just put in a null check in |
I had the same pr as well. #3156 I think this is the correct fix for reasons mentioned in #3156 (comment) The main reason why is svelte cannot stop outside code from removing elements from the DOM. Also see for a further explanation #2086 (comment) |
This should be fixed in 3.6.7, so I'll close this issue. Thanks |
This problem's been solved with This REPL is a very minimal example of combining a Meanwhile, in a sapper environment (code on Glitch.com), this actually does work setting up the Let me know how I can help further debugging and feel free to remix the Glitch environment 😄 |
This is basicaly the same issue, parent node is
null
when detach is called.sveltejs/sapper-template#158
The text was updated successfully, but these errors were encountered: