Open harshmandan opened 8 months ago
Slots can't be wrapped in #if statements, but on using the slot with a component which is wrapped in #if statement, the compiler does not produce any error.
#if
Here's a repo for reproduction:
https://stackblitz.com/edit/sveltejs-kit-template-default-wvmusb?file=src%2Froutes%2F%2Bpage.svelte
Here's a screenshot:
No response
Sveltekit v2.0.4
annoyance
Not just on components, using <slot name="etc" for="etc" /> for slot forwarding inside an {#if $$slots.etc} block also silently fails.
<slot name="etc" for="etc" />
{#if $$slots.etc}
Describe the bug
Slots can't be wrapped in
#if
statements, but on using the slot with a component which is wrapped in#if
statement, the compiler does not produce any error.Reproduction
Here's a repo for reproduction:
https://stackblitz.com/edit/sveltejs-kit-template-default-wvmusb?file=src%2Froutes%2F%2Bpage.svelte
Here's a screenshot:
Logs
No response
System Info
Severity
annoyance