Fixing running map against empty array bug #2359

This commit is contained in:
Mike Farah
2025-05-10 07:24:48 +10:00
parent 734e2cd254
commit 22949df0fd
2 changed files with 64 additions and 0 deletions
+4
View File
@@ -41,6 +41,10 @@ func mapOperator(d *dataTreeNavigator, context Context, expressionNode *Expressi
if err != nil {
return Context{}, err
}
if splatted.MatchingNodes.Len() == 0 {
results.PushBack(candidate.Copy())
continue
}
result, err := d.GetMatchingNodes(splatted, expressionNode.RHS)
log.Debug("expressionNode.Rhs %v", expressionNode.RHS.Operation.OperationType)