From c0fba36856082064aa8d594c39a1060df0a61392 Mon Sep 17 00:00:00 2001 From: Derek Severin Date: Wed, 2 Jan 2019 17:55:10 +0100 Subject: Fixed bug when no subsections in a project section --- layouts/partials/sections/projects.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/layouts/partials/sections/projects.html b/layouts/partials/sections/projects.html index 19017e9..6262d5a 100644 --- a/layouts/partials/sections/projects.html +++ b/layouts/partials/sections/projects.html @@ -12,12 +12,14 @@ {{ end }}
- {{/* Sort the list */}} - {{ partial "utils/ordered-list.html" (dict "list" .Sections "params" .Params "scratch" .Scratch) }} - {{ range (.Scratch.Get "list") }} - {{ .Render "limage" }} + {{ if .Sections }} + {{/* Sort the list */}} + {{ partial "utils/ordered-list.html" (dict "list" .Sections "params" .Params "scratch" .Scratch) }} + {{ range (.Scratch.Get "list") }} + {{ .Render "limage" }} + {{ end }} + {{ .Scratch.Delete "list" }} {{ end }} - {{ .Scratch.Delete "list" }}
-- cgit v1.2.3