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
Astro v4.3.2
Node v19.8.1
System Windows (x64)
Package Manager pnpm
Output static
Adapter none
Integrations none
If this issue only occurs in one browser, which browser is a problem?
Chrome, Firefox, Opera
Describe the Bug
Hello,
I've been going through Build a blog tutorial, and I've noticed some content disappeared, when I wrapped it in layout.
When using ternary operator ?:, or && and || operators to render content in slot, only last resolved conditional content remains. Any other content passed into slot is removed.
Thanks for taking the time to report the issue!
We're aware of the regression and we're working on a fix, so I'm going to close this in favor of withastro/compiler#955
Astro Info
If this issue only occurs in one browser, which browser is a problem?
Chrome, Firefox, Opera
Describe the Bug
Hello,
I've been going through Build a blog tutorial, and I've noticed some content disappeared, when I wrapped it in layout.
When using ternary operator
?:
, or&&
and||
operators to render content in slot, only last resolved conditional content remains. Any other content passed into slot is removed.Example:
Becomes:
Instead of:
Without using
<slot />
, content renders as expected.Workaround is to wrap condition in some other element (e.g.
div
).What's the expected result?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/astro-yfzk5c-slot-issues?file=src%2Fpages%2Findex.astro
Participation
The text was updated successfully, but these errors were encountered: