Fix GetTerms nil pointer

Fixes #7061
This commit is contained in:
Carl Johnson
2020-03-20 09:35:41 -04:00
committed by GitHub
parent c947351d7c
commit 95f492114e
2 changed files with 5 additions and 3 deletions

View File

@@ -141,7 +141,7 @@ func (p *pageState) GetTerms(taxonomy string) page.Pages {
if p.IsHome() {
// TODO(bep) make this less magical, see taxonomyEntries.Insert.
self = "/" + page.KindHome
} else {
} else if p.treeRef != nil {
self = p.treeRef.key
}