mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 13:48:24 +08:00
Fixing running map against empty array bug #2359
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user