Skip to content

Commit

Permalink
Fix section index partial NPE (google#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiaskohlbau authored Apr 25, 2024
1 parent 256af85 commit 3be4075
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion layouts/partials/section-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{{ $pages = (where $pages "Type" "!=" "search") }}
{{ $pages = (where $pages ".Params.hide_summary" "!=" true) -}}
{{ $pages = (where $pages ".Parent" "!=" nil) -}}
{{ if and .Parent .Parent.File -}}
{{ $pages = (where $pages ".Parent.File" "!=" nil) -}}
{{ 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 3be4075

Please sign in to comment.