Fixed runaway rolodex.

The rolodex was running away and locking up vacuum.

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2024-01-31 15:15:24 -08:00
parent c55527066a
commit a24c05036b
4 changed files with 13 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ func FindComponent(root *yaml.Node, componentId, absoluteFilePath string, index
friendlySearch = "$"
}
path, err := yamlpath.NewPath(friendlySearch)
if path == nil || err != nil {
if path == nil || err != nil || root == nil {
return nil // no component found
}
res, _ := path.Find(root)