Closed tamaracha closed 9 months ago
Thanks for reporting the issue! This seems like regression that snuck in with the last patch. I'll dig into this further to get a fix ASAP.
A similar issue is happening with fragments. It might be related to this. Link to issue: https://github.com/withastro/astro/issues/9997
What version of
@astrojs/compiler
are you using?2.5.2
What package manager are you using?
npm
What operating system are you using?
Mac OS Ventura 13.6.1
Describe the Bug
If a slot, e.g., a layout's default slot, contains multiple elements and if one of them is a jsx ternary expression, only this one remains and the other ones disappear. It looks similar to #950, but with ternary instead of loops.
Everything before and after this within a slot will be erased:
Moving the expression into a fragment solves the problem:
Is this intended?
My reprex is the astro blog template with the critical addition in the BlogPost layout.
Link to Minimal Reproducible Example
https://github.com/tamaracha/reprex-astro-syntax