From e3f4eedd5183b08ab39e24d6b26e90bc7c1de289 Mon Sep 17 00:00:00 2001 From: Mike Farah Date: Mon, 6 Jan 2020 10:12:38 +1300 Subject: [PATCH] Fixed merge new array --- pkg/yqlib/data_navigator.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/yqlib/data_navigator.go b/pkg/yqlib/data_navigator.go index 86a89a21..2a0ec80c 100644 --- a/pkg/yqlib/data_navigator.go +++ b/pkg/yqlib/data_navigator.go @@ -239,10 +239,6 @@ func (n *navigator) recurseArray(value *yaml.Node, head string, tail []string, p value.Content = append(value.Content, &yaml.Node{Kind: guessKind(head, tail, 0)}) } - if index >= int64(len(value.Content)) { - log.Debug("index longer than array length, aborting!") - return nil - } value.Content[index] = n.getOrReplace(value.Content[index], guessKind(head, tail, value.Content[index].Kind)) return n.doTraverse(value.Content[index], head, tail, append(pathStack, index))