chain evaluation returns true in case of nothing to eval, also fixed stat layer comparison
This commit is contained in:
@@ -19,6 +19,10 @@ func (ch *evaluationChain) Add(result bool, operand nip.Operand) {
|
||||
}
|
||||
|
||||
func (ch *evaluationChain) Evaluate() bool {
|
||||
if len(ch.links) == 0 {
|
||||
return true
|
||||
}
|
||||
|
||||
if len(ch.links) == 1 {
|
||||
return ch.links[0].Result
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ func checkStat(i data.Item, cmp nip.Comparable) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
return st[2] == itemStat.Layer
|
||||
return st[1] == itemStat.Layer
|
||||
}
|
||||
|
||||
func checkProperty(i data.Item, prop nip.Comparable) bool {
|
||||
|
||||
Reference in New Issue
Block a user