mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix bugs
Signed-off-by: Hung-Han (Henry) Chen <chenhungh@gmail.com>
This commit is contained in:
parent
f168f137e5
commit
adbd8dca70
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user