From 4d7fa9f114c62ae2ec12257203ed21b0e4d69a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Sat, 23 May 2020 15:04:00 +0200 Subject: Fix IsAncestor/IsDescendant for taxonomies Fixes #7305 --- hugolib/page__tree.go | 8 -------- 1 file changed, 8 deletions(-) (limited to 'hugolib/page__tree.go') diff --git a/hugolib/page__tree.go b/hugolib/page__tree.go index 5b53dc4cd..d2ef00e76 100644 --- a/hugolib/page__tree.go +++ b/hugolib/page__tree.go @@ -50,10 +50,6 @@ func (pt pageTree) IsAncestor(other interface{}) (bool, error) { return ref1.n.p.IsHome(), nil } - if !ref1.isSection() { - return false, nil - } - if ref1.key == ref2.key { return true, nil } @@ -101,10 +97,6 @@ func (pt pageTree) IsDescendant(other interface{}) (bool, error) { return ref2.n.p.IsHome(), nil } - if !ref2.isSection() { - return false, nil - } - if ref1.key == ref2.key { return true, nil } -- cgit v1.2.3