Fixed passing of readonly context in pipe

This commit is contained in:
Mike Farah
2023-04-11 12:04:04 +10:00
parent 9d3c402923
commit 385921a3e2
3 changed files with 17 additions and 2 deletions
+2 -2
View File
@@ -5,12 +5,12 @@ func pipeOperator(d *dataTreeNavigator, context Context, expressionNode *Express
if expressionNode.LHS.Operation.OperationType == assignVariableOpType {
return variableLoop(d, context, expressionNode)
}
lhs, err := d.GetMatchingNodes(context, expressionNode.LHS)
if err != nil {
return Context{}, err
}
rhs, err := d.GetMatchingNodes(lhs, expressionNode.RHS)
rhsContext := context.ChildContext(lhs.MatchingNodes)
rhs, err := d.GetMatchingNodes(rhsContext, expressionNode.RHS)
if err != nil {
return Context{}, err
}