Fix error when there is no comment in staticman

Fixes #134
This commit is contained in:
tutysara 2018-02-13 00:47:46 +05:30 committed by GitHub
commit 05cf2daa26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,7 @@
{{ else }} {{ else }}
<h3>{{ i18n "noComment" }}</h3> <h3>{{ i18n "noComment" }}</h3>
{{ end }} {{ end }}
{{ end }}
{{ $.Scratch.Set "hasComments" 0 }} {{ $.Scratch.Set "hasComments" 0 }}
{{ range $index, $comments := (index $.Site.Data.comments $slug ) }} {{ range $index, $comments := (index $.Site.Data.comments $slug ) }}
@ -31,6 +31,7 @@
</article> </article>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }}