diff --git a/layout.go b/layout.go
index adf9b88..b99e0b1 100644
--- a/layout.go
+++ b/layout.go
@@ -80,9 +80,6 @@ func (l *Layout) Render(ctx *Context) string {
for i := range len(l.variant) {
slot := l.variant[i]
children := l.slots[slot]
- if len(children) == 0 {
- continue
- }
meta, ok := slotRegistry[slot]
if !ok {
diff --git a/layout_test.go b/layout_test.go
index 53532f4..941af3e 100644
--- a/layout_test.go
+++ b/layout_test.go
@@ -114,3 +114,16 @@ func TestLayout_IgnoresInvalidSlots(t *testing.T) {
t.Errorf("C variant should ignore R slot content, got:\n%s", got)
}
}
+
+func TestLayout_RendersEmptySlots(t *testing.T) {
+ ctx := NewContext()
+ layout := NewLayout("HCF")
+
+ got := layout.Render(ctx)
+
+ for _, want := range []string{``, ``, ``} {
+ if !strings.Contains(got, want) {
+ t.Errorf("empty slot should still render %q in:\n%s", want, got)
+ }
+ }
+}