mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix crash when finding CRD's preferred version (#4332)
This commit is contained in:
1 parent
4c83f5becf
commit
e51ff5051f
4 files changed
+53
-9
No files matched your search
@@ -153,11 +153,7 @@ export class CustomResourceDefinition extends KubeObject {
|
||||
// Prefer the modern `versions` over the legacy `version`
|
||||
if (this.spec.versions) {
|
||||
for (const version of this.spec.versions) {
|
||||
/**
|
||||
* If the version is not served then 404 errors will occur
|
||||
* We should also prefer the storage version
|
||||
*/
|
||||
if (version.served && version.storage) {
|
||||
if (version.storage) {
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user