From 3692cb8dbdbe0d8181b206b7a02248470385dbb4 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Fri, 16 Feb 2024 17:28:34 -0500 Subject: [PATCH] Section-index: ensure .Parent isn't nil (#1866) --- layouts/partials/section-index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/partials/section-index.html b/layouts/partials/section-index.html index fc147f130b..845d5c6148 100644 --- a/layouts/partials/section-index.html +++ b/layouts/partials/section-index.html @@ -4,7 +4,7 @@ {{ $pages = (where $pages "Type" "!=" "search") }} {{ $pages = (where $pages ".Params.hide_summary" "!=" true) -}} {{ $pages = (where $pages ".Parent" "!=" nil) -}} - {{ if .Parent.File -}} + {{ if and .Parent .Parent.File -}} {{ $pages = (where $pages "Parent.File.UniqueID" "==" $parent.File.UniqueID) -}} {{ end -}} {{ if or $parent.Params.no_list (eq (len $pages) 0) -}}