feat: only show question answers if they exist (#119)

This commit is contained in:
httpjamesm 2024-05-05 15:40:01 -04:00 committed by GitHub
parent 67c09e5e89
commit c2a9b4368a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,6 +45,7 @@
{{ if .question.Comments }} {{ template "comments.html" {{ if .question.Comments }} {{ template "comments.html"
.question }} {{end}} .question }} {{end}}
</div> </div>
{{ if .answers }}
<hr class="post-divider" /> <hr class="post-divider" />
<div class="answers-header"> <div class="answers-header">
<h2>Answers</h2> <h2>Answers</h2>
@ -89,6 +90,7 @@
{{end}} {{end}}
</div> </div>
{{ end }} {{ end }}
{{ end }}
</body> </body>
</html> </html>