hugolib: Do not return error in Eq on type mismatch

This commit is contained in:
Bjørn Erik Pedersen 2017-08-17 08:32:47 +02:00
parent c265c102ae
commit a7555c5431

View file

@ -115,7 +115,8 @@ func (p *Page) IsAncestor(other interface{}) (bool, error) {
func (p *Page) Eq(other interface{}) (bool, error) { func (p *Page) Eq(other interface{}) (bool, error) {
pp, err := unwrapPage(other) pp, err := unwrapPage(other)
if err != nil { if err != nil {
return false, err // Do not return an error on type mismatch.
return false, nil
} }
return p == pp, nil return p == pp, nil