You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you look at the compiled JS output (especially obvious when using SSR), you can see that the compiler already "optimized" the away, and does not even try to pass it to the component.
<MyComponent>
</MyComponent>
Which leads to this output:
${validate_component(MyComponent,"MyComponent").$$render($$result,{},{},{})}// ^ Note the missing default
As a workaround, I was able to add an additional <span>:
<MyComponent>
<span> </span>
</MyComponent>
Which leads to this output, which is what I would expect:
Describe the bug
I have a simple component like this:
Sometimes I don't want to show any content, but still want it to take up space. To achieve that, I want to pass an
:But I noticed that the actual output in the DOM does not contain any spaces at all:
I expected:
Reproduction
https://svelte.dev/repl/9ece32e45c564cd68693684349802da6?version=3.55.1
If you look at the compiled JS output (especially obvious when using SSR), you can see that the compiler already "optimized" the
away, and does not even try to pass it to the component.Which leads to this output:
As a workaround, I was able to add an additional
<span>
:Which leads to this output, which is what I would expect:
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: