mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Use IsListType instead of checking ItemPtr in resourcebuilder
This commit is contained in:
parent
b799e8cd3a
commit
a97635e643
@ -133,7 +133,7 @@ func (r *Result) Object() (runtime.Object, error) {
|
||||
return objects[0], nil
|
||||
}
|
||||
// if the item is a list already, don't create another list
|
||||
if _, err := runtime.GetItemsPtr(objects[0]); err == nil {
|
||||
if runtime.IsListType(objects[0]) {
|
||||
return objects[0], nil
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user