Fixed "error calling after: no items left"

This commit is contained in:
Nikolay Yakimov 2017-03-26 05:06:15 +03:00
parent 56791780ac
commit 9144ca72aa
No known key found for this signature in database
GPG key ID: 8E9303568F9B9650

View file

@ -35,7 +35,11 @@
{{ $.Scratch.Set "first" $index }}
{{ else }}
{{ $.Scratch.Set "first" (index $value 0).Page }}
{{ $.Scratch.Set "_value" (after 1 $value) }}
{{ if gt $value.Len 1 }}
{{ $.Scratch.Set "_value" (after 1 $value) }}
{{ else }}
{{ $.Scratch.Set "_value" nil }}
{{ end }}
{{ end }}
{{ end }}
{{ $first := $.Scratch.Get "first" }}