tests... pass
This commit is contained in:
parent
e370e34aeb
commit
671ef91008
@ -531,11 +531,14 @@ func (d *decoder) decodeStruct(name string, node ast.Node, result reflect.Value)
|
|||||||
var decodeNode ast.Node
|
var decodeNode ast.Node
|
||||||
matches := list.Prefix(fieldName)
|
matches := list.Prefix(fieldName)
|
||||||
if len(matches.Items) == 0 {
|
if len(matches.Items) == 0 {
|
||||||
item := list.Get(fieldName)
|
single := list.Get(fieldName)
|
||||||
if item == nil {
|
if single == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
decodeNode = item.Val
|
decodeNode = single.Val
|
||||||
|
if ot, ok := decodeNode.(*ast.ObjectType); ok {
|
||||||
|
decodeNode = &ast.ObjectList{Items: ot.List.Items}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
decodeNode = matches
|
decodeNode = matches
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user