Length compares to null instead of 0 issue #1427

This commit is contained in:
Mike Farah
2022-11-14 16:14:08 +11:00
parent 3e795d020d
commit ffc20f7e2c
6 changed files with 34 additions and 15 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func traverse(context Context, matchingNode *CandidateNode, operation *Operation
log.Debug("Traversing %v", NodeToString(matchingNode))
value := matchingNode.Node
if value.Tag == "!!null" && operation.Value != "[]" {
if value.Tag == "!!null" && operation.Value != "[]" && !context.DontAutoCreate {
log.Debugf("Guessing kind")
// we must have added this automatically, lets guess what it should be now
switch operation.Value.(type) {