-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Runtime error with nested components, {{#if}}s, and {{yield}} #643
Comments
Hitting the same error in one of my projects using Svelte when I upgraded from a 5 month old version. Only difference is that while it's the same error (calling unmount on null fragment) my project doesn't use loops. Your example is much smaller than mine, so I'll try to debug it and figure out what's going on. |
yeah, it may be possible to trigger the issue with a |
Found it: svelte/src/generators/dom/visitors/IfBlock.ts Lines 274 to 278 in fe75570
|
Is this issue fixed? Tried to run the Modal example from the guide, but got the same error. Tried it locally, and also in the REPL. I am on version 1.23.4. |
My reproduction cases above don't throw errors any more with 1.27.0. |
I've updated to latest version in my large project and no issues. |
don't throw error if component is destroyed twice
Fixed in 1.28 |
Very similar to #625 - observed in Svelte 1.22.3.
I got a reproduction in the REPL here but then downloaded it locally to fiddle with it some more, so you can find an even slimmer reproduction in https://github.com/TehShrike/svelte-1-22-3-nested-yield-issue-repro
When the state changes and causes some elements to be cleaned up, an error is thrown
Uncaught TypeError: Cannot read property 'unmount' of null
Seems to happen when there is a loop that contains a component with
{{yield}}
inside of an{{#if}}
block, but only when there is another Svelte component nested inside of theyield
ing component.The text was updated successfully, but these errors were encountered: