mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 02:03:24 +08:00
Fixed delete bug
This commit is contained in:
@@ -13,8 +13,8 @@ func deleteChildOperator(d *dataTreeNavigator, context Context, expressionNode *
|
||||
if err != nil {
|
||||
return Context{}, err
|
||||
}
|
||||
|
||||
for el := nodesToDelete.MatchingNodes.Front(); el != nil; el = el.Next() {
|
||||
//need to iterate backwards to ensure correct indices when deleting multiple
|
||||
for el := nodesToDelete.MatchingNodes.Back(); el != nil; el = el.Prev() {
|
||||
candidate := el.Value.(*CandidateNode)
|
||||
|
||||
deleteImmediateChildOp := &Operation{
|
||||
|
||||
Reference in New Issue
Block a user