mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
hugolib: Do not return error in Eq on type mismatch
This commit is contained in:
@@ -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
|
||||||
|
Reference in New Issue
Block a user