feat: only show question answers if they exist

This commit is contained in:
httpjamesm 2024-05-05 15:31:52 -04:00
parent 8174f2ee44
commit 3d095c16f2

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>