shithub: hugo

Download patch

ref: a7555c54310612a746d34361a2d58f62207349bb
parent: c265c102ae0705011bca6999e5b1c14fb00fa859
author: Bjørn Erik Pedersen <[email protected]>
date: Thu Aug 17 04:32:47 EDT 2017

hugolib: Do not return error in Eq on type mismatch

--- a/hugolib/site_sections.go
+++ b/hugolib/site_sections.go
@@ -115,7 +115,8 @@
 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