mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
2 files changed
+2
-2
No files matched your search
@@ -65,7 +65,7 @@ export class CatalogEntityRegistry {
|
||||
|
||||
getItemsForCategory<T extends CatalogEntity>(category: CatalogCategory): T[] {
|
||||
const supportedVersions = category.spec.versions.map((v) => `${category.spec.group}/${v.name}`);
|
||||
const items = this._items.filter((item) => supportedVersions.includes(item.apiVersion) && item.kind === category.spec.names.kind);
|
||||
const items = this._items.filter((item) => supportedVersions.includes(item?.apiVersion) && item.kind === category.spec.names.kind);
|
||||
|
||||
return items as T[];
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export class HotbarMenu extends React.Component<Props> {
|
||||
return null;
|
||||
}
|
||||
|
||||
return item ? catalogEntityRegistry.items.find((entity) => entity.metadata.uid === item.entity.uid) : null;
|
||||
return item ? catalogEntityRegistry.items.find((entity) => entity?.metadata.uid === item.entity.uid) : null;
|
||||
}
|
||||
|
||||
onDragEnd(result: DropResult) {
|
||||
|
||||
Reference in new issue
Block a user