Don't render twice with children (#9)
Markus Wüstenberg markus@maragu.dk
Mon, 21 Sep 2020 11:14:37 +0200
1 files changed, 3 insertions(+), 4 deletions(-)
jump to
M gomponents.go → gomponents.go
@@ -45,12 +45,11 @@ return b.String() } for _, c := range children { - s := c.Render() if _, ok := c.(attr); ok { - attrString.WriteString(s) - continue + attrString.WriteString(c.Render()) + } else { + childrenString.WriteString(c.Render()) } - childrenString.WriteString(c.Render()) } b.WriteString(attrString.String())