Skip to content

Commit

Permalink
fix: fixing double render on enable minifier (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
prakasa1904 authored Aug 6, 2024
1 parent aa66b09 commit a766ade
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions render/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func (p *Page) Render(page string) error {
if err != nil {
return fmt.Errorf("could not write to response minify: %w", err)
}

return nil
}

_, err = p.writer.Write([]byte(html))
Expand Down Expand Up @@ -105,6 +107,8 @@ func (p *Page) RenderWithLayout(page, layout string) error {
if err != nil {
return fmt.Errorf("could not write to response minify: %w", err)
}

return nil
}

_, err = p.writer.Write([]byte(html))
Expand Down Expand Up @@ -137,6 +141,8 @@ func (p *Page) RenderClean(name string) error {
if err != nil {
return fmt.Errorf("could not write to response minify: %w", err)
}

return nil
}

_, err = p.writer.Write([]byte(html))
Expand Down

0 comments on commit a766ade

Please sign in to comment.