mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
don't assign to priority in getItemsForKind
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
f6f81438f1
commit
15b34e1c63
@ -35,10 +35,6 @@ export class EntitySettingRegistry extends BaseRegistry<EntitySettingRegistratio
|
||||
getItemsForKind(kind: string, apiVersion: string, source?: string) {
|
||||
let items = this.getItems().filter((item) => {
|
||||
return item.kind === kind && item.apiVersions.includes(apiVersion);
|
||||
}).map((item) => {
|
||||
item.priority = item.priority ?? 50;
|
||||
|
||||
return item;
|
||||
});
|
||||
|
||||
if (source) {
|
||||
@ -47,7 +43,7 @@ export class EntitySettingRegistry extends BaseRegistry<EntitySettingRegistratio
|
||||
});
|
||||
}
|
||||
|
||||
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