From 633daad6c9fc4082626020b4ddd7886caf5a6753 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Fri, 26 Aug 2022 15:47:40 +0100 Subject: Fix error adding category through UI Signed-off-by: MichaelMorris Issue-ID: SDC-4144 Change-Id: I9227131ad89c3135f5ab3eceed4d34ff8fd1627d (cherry picked from commit b95ca35cd3fc0f68a6eb2d09bb347d9ba659caf3) --- .../src/app/view-models/workspace/tabs/general/general-view-model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'catalog-ui') diff --git a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts index 043f4dd859..1d38eba467 100644 --- a/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts +++ b/catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts @@ -853,7 +853,7 @@ export class GeneralViewModel { // reload categories this.$scope.initCategories(); this.$scope.categories = this.$scope.categories.filter(category => - !modelName ? category.models.indexOf(DEFAULT_MODEL_NAME) !== -1 : category.models !== null && category.models.indexOf(modelName) !== -1); + !modelName ? !category.models || category.models.indexOf(DEFAULT_MODEL_NAME) !== -1 : category.models !== null && category.models.indexOf(modelName) !== -1); } -- cgit 1.2.3-korg