mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 04:20:17 +00:00
Added a nill check to lookup.
was causing vacuum to crash during testing.
This commit is contained in:
@@ -336,7 +336,7 @@ func FindKeyNodeFull(key string, nodes []*yaml.Node) (keyNode *yaml.Node, labelN
|
||||
}
|
||||
}
|
||||
|
||||
if key == v.Content[x].Value {
|
||||
if len(v.Content) > 0 && key == v.Content[x].Value {
|
||||
if IsNodeMap(v) {
|
||||
if x+1 == len(v.Content) {
|
||||
return v, v.Content[x], NodeAlias(v.Content[x])
|
||||
|
||||
Reference in New Issue
Block a user