Refactor copySlots method to use slot.Contents() instead of slot.Children()

This commit is contained in:
Max 2024-07-18 19:13:22 +08:00
parent 49c66870f8
commit 58534f532f
2 changed files with 2 additions and 2 deletions

View file

@ -242,7 +242,7 @@ func (page *Page) copySlots(from *goquery.Selection, to *goquery.Selection) erro
continue continue
} }
slotSel.ReplaceWithSelection(slot.Children()) slotSel.ReplaceWithSelection(slot.Contents())
} }
return nil return nil

View file

@ -99,7 +99,7 @@ func (parser *TemplateParser) RenderComponent(comp *JitComponent, props map[stri
} }
// Replace the slot // Replace the slot
slotSel.ReplaceWithNodes(s.Contents().Nodes...) slotSel.ReplaceWithSelection(s.Contents())
}) })
option := *parser.option option := *parser.option