Skip to content

Commit

Permalink
Section-index: ensure .Parent isn't nil (#1866)
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Feb 16, 2024
1 parent 85fbe76 commit 3692cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layouts/partials/section-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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) -}}
Expand Down

0 comments on commit 3692cb8

Please sign in to comment.