publication archive: Fix error when no publications exist

This commit is contained in:
George Cushen 2017-11-23 01:05:10 +00:00
commit 9e14c8a74e

View file

@ -33,11 +33,13 @@
<select class="pub-filters" data-filter-group="year">
<option value="*">{{ i18n "filter_all" }}</option>
{{ $years_sorted := $.Scratch.GetSortedMapValues "years" }}
{{ if $years_sorted }}
{{ range $year := sort $years_sorted "" "desc" }}
<option value=".year-{{ $year }}">
{{ $year }}
</option>
{{ end }}
{{ end }}
</select>
</p>