-
-
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
Conditional slot errors at runtime #849
Comments
Rich-Harris
added a commit
that referenced
this issue
Sep 16, 2017
Rich-Harris
added a commit
that referenced
this issue
Sep 16, 2017
compile time error on slotted content inside if/each blocks. closes #849
Thanks. I concluded that it's a bit too fiddly to allow |
You really are unstoppable. 🥇 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Slot content added inside an if currently fails at runtime:
https://svelte.technology/repl?version=1.39.2&gist=d4a50532f6a783ada53f35a2b9a7f9e4
This can be easily fixed by moving the condition inside the slot:
https://svelte.technology/repl?version=1.39.2&gist=3bf75a560243feecdeaca013a0e7ad26
I don't know if it makes sense to allow slots inside conditionals, but if not, Svelte could at least error on their usage.
The text was updated successfully, but these errors were encountered: