hugolib: Do not return error in Eq on type mismatch - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit a7555c54310612a746d34361a2d58f62207349bb
DIR parent c265c102ae0705011bca6999e5b1c14fb00fa859
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Thu, 17 Aug 2017 08:32:47 +0200
hugolib: Do not return error in Eq on type mismatch
Diffstat:
M hugolib/site_sections.go | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
DIR diff --git a/hugolib/site_sections.go b/hugolib/site_sections.go
@@ -115,7 +115,8 @@ func (p *Page) IsAncestor(other interface{}) (bool, error) {
func (p *Page) Eq(other interface{}) (bool, error) {
pp, err := unwrapPage(other)
if err != nil {
- return false, err
+ // Do not return an error on type mismatch.
+ return false, nil
}
return p == pp, nil