Fixing readonly ops not to modify context when paths dont exist

This commit is contained in:
Mike Farah
2021-05-16 14:00:30 +10:00
parent afebf0e621
commit 3f51a44596
12 changed files with 95 additions and 18 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ func sortKeysOperator(d *dataTreeNavigator, context Context, expressionNode *Exp
for el := context.MatchingNodes.Front(); el != nil; el = el.Next() {
candidate := el.Value.(*CandidateNode)
rhs, err := d.GetMatchingNodes(context.SingleChildContext(candidate), expressionNode.Rhs)
rhs, err := d.GetMatchingNodes(context.SingleReadonlyChildContext(candidate), expressionNode.Rhs)
if err != nil {
return Context{}, err
}