mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-13 20:14:58 +00:00
hugolib: Do not return error in Eq on type mismatch
This commit is contained in:
1 parent
c265c102ae
commit
a7555c5431
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user