mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix KubeObjectDetailRegistry as well
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
15b34e1c63
commit
dc4ad2e53f
@ -16,15 +16,9 @@ export class KubeObjectDetailRegistry extends BaseRegistry<KubeObjectDetailRegis
|
|||||||
getItemsForKind(kind: string, apiVersion: string) {
|
getItemsForKind(kind: string, apiVersion: string) {
|
||||||
const items = this.getItems().filter((item) => {
|
const items = this.getItems().filter((item) => {
|
||||||
return item.kind === kind && item.apiVersions.includes(apiVersion);
|
return item.kind === kind && item.apiVersions.includes(apiVersion);
|
||||||
}).map((item) => {
|
|
||||||
if (item.priority === null) {
|
|
||||||
item.priority = 50;
|
|
||||||
}
|
|
||||||
|
|
||||||
return item;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return items.sort((a, b) => b.priority - a.priority);
|
return items.sort((a, b) => (b.priority ?? 50) - (a.priority ?? 50));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user