mirror of
https://github.com/gohugoio/hugo.git
synced 2024-07-04 16:21:57 +00:00
hugolib: Do not return error in Eq on type mismatch
This commit is contained in:
parent
c265c102ae
commit
a7555c5431
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue