mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Improve error handling for json path results
This commit is contained in:
parent
61d6026d23
commit
a0dc949ce3
@ -363,7 +363,7 @@ func (a customResourceStrategy) selectableFields(obj runtime.Object, objectMeta
|
||||
}
|
||||
var value any
|
||||
|
||||
if len(results) > 0 && len(results[0]) == 1 {
|
||||
if len(results) > 0 && len(results[0]) > 0 {
|
||||
if len(results) > 1 || len(results[0]) > 1 {
|
||||
return nil, fmt.Errorf("unexpectedly received more than one JSON path result")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user