mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Do not return error in Eq on type mismatch
This commit is contained in:
parent
c265c102ae
commit
a7555c5431
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue