From 4919d358aaddce632dbd8ad670274af8894540ee Mon Sep 17 00:00:00 2001 From: Panu Horsmalahti Date: Mon, 17 Jan 2022 14:07:10 +0200 Subject: [PATCH] Simplify getItemsByEntityClass Signed-off-by: Panu Horsmalahti --- src/main/catalog/catalog-entity-registry.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/catalog/catalog-entity-registry.ts b/src/main/catalog/catalog-entity-registry.ts index 63bbb56756..65f60d8e4e 100644 --- a/src/main/catalog/catalog-entity-registry.ts +++ b/src/main/catalog/catalog-entity-registry.ts @@ -43,12 +43,8 @@ export class CatalogEntityRegistry { return this.items.filter((item) => item.apiVersion === apiVersion && item.kind === kind) as T[]; } - getItemsOfType(Constructor: CatalogEntityConstructor): T[] { - return this.items.filter((item) => item instanceof Constructor) as T[]; - } - getItemsByEntityClass(constructor: CatalogEntityConstructor): T[] { - return this.getItemsOfType(constructor); + return this.items.filter((item) => item instanceof constructor) as T[]; } }