stacks/stx
fix(loops): an @empty(expr) conditional in a @forelse row is not the separator
#2104
Open
mkantautas
wants to merge
fix/forelse-empty-conditional
into
main
2 files
+24
-2
packages/stx/test/directives/loops.test.tsmodified+20-0Changes to packages/stx/test/directives/loops.test.ts | @@ -575,6 +575,26 @@ describe('Loops Comprehensive', () => { |
| 575 | 575 | expect(result).toContain('x') |
| 576 | 576 | expect(result).not.toContain('empty') |
| 577 | 577 | }) |
| 578 | + it('should not take an @empty(expr) conditional in a row for the @empty separator', () => { |
| 579 | + const template = '@forelse(items as item)<p>@empty(item.name)missing
|