Fixed alternative operator when LHS has empty matches

This commit is contained in:
Mike Farah
2021-04-13 10:53:46 +10:00
parent 095f921f62
commit 25e0a824c5
9 changed files with 53 additions and 23 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func toNodes(candidate *CandidateNode) []*yaml.Node {
func addOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
log.Debugf("Add operator")
return crossFunction(d, context, expressionNode, add)
return crossFunction(d, context, expressionNode, add, false)
}
func add(d *dataTreeNavigator, context Context, lhs *CandidateNode, rhs *CandidateNode) (*CandidateNode, error) {