tpl/compare: Fix eq when > 2 args

Fixes #6786
This commit is contained in:
Bjørn Erik Pedersen
2020-01-23 10:48:28 +01:00
parent 0c251be66b
commit 2fefc01606
2 changed files with 11 additions and 2 deletions

View File

@@ -119,11 +119,17 @@ func (n *Namespace) Eq(first interface{}, others ...interface{}) bool {
normFirst := normalize(first)
for _, other := range others {
if e, ok := first.(compare.Eqer); ok {
return e.Eq(other)
if e.Eq(other) {
return true
}
continue
}
if e, ok := other.(compare.Eqer); ok {
return e.Eq(first)
if e.Eq(first) {
return true
}
continue
}
other = normalize(other)