mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix: don't remove clear all of groupKinds when running disposer (#2835)
This commit is contained in:
1 parent
9f1e262310
commit
847ba3f8eb
2 files changed
+80
-9
No files matched your search
@@ -33,18 +33,14 @@ export class CatalogCategoryRegistry {
|
||||
|
||||
@action add(category: CatalogCategory): Disposer {
|
||||
this.categories.add(category);
|
||||
this.updateGroupKinds(category);
|
||||
|
||||
return () => {
|
||||
this.categories.delete(category);
|
||||
this.groupKinds.clear();
|
||||
};
|
||||
}
|
||||
|
||||
private updateGroupKinds(category: CatalogCategory) {
|
||||
this.groupKinds
|
||||
.getOrInsert(category.spec.group, ExtendedMap.new)
|
||||
.strictSet(category.spec.names.kind, category);
|
||||
|
||||
return () => {
|
||||
this.categories.delete(category);
|
||||
this.groupKinds.get(category.spec.group).delete(category.spec.names.kind);
|
||||
};
|
||||
}
|
||||
|
||||
@computed get items() {
|
||||
|
||||
Reference in new issue
Block a user