diff options
Diffstat (limited to 'hugolib/page__tree.go')
-rw-r--r-- | hugolib/page__tree.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hugolib/page__tree.go b/hugolib/page__tree.go index 08fda2289..2c3528922 100644 --- a/hugolib/page__tree.go +++ b/hugolib/page__tree.go @@ -121,11 +121,13 @@ func (pt pageTree) Parent() page.Page { return nil } - if pt.p.Kind() == page.KindTaxonomyTerm { + tree := p.getTreeRef() + + if pt.p.Kind() == page.KindTaxonomyTerm || tree == nil { return pt.p.s.home } - _, b := p.getTreeRef().getSection() + _, b := tree.getSection() if b == nil { return nil } |