Fixed recursive decent on empty objects/arrays

This commit is contained in:
Mike Farah
2020-11-25 15:01:12 +11:00
parent 0a66bb797d
commit 5205f01248
6 changed files with 27 additions and 5 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func recursiveDecent(d *dataTreeNavigator, results *list.List, matchMap *list.Li
log.Debugf("Recursive Decent, added %v", NodeToString(candidate))
results.PushBack(candidate)
if candidate.Node.Kind != yaml.AliasNode {
if candidate.Node.Kind != yaml.AliasNode && len(candidate.Node.Content) > 0 {
children, err := Splat(d, nodeToMap(candidate))