aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-08-26 15:47:40 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2022-09-01 08:19:18 +0000
commit633daad6c9fc4082626020b4ddd7886caf5a6753 (patch)
treeaa76cca95e6c2fc0c26c27ebe1dc8ed40cf86121
parenta062326d5c284d58dc009387f4c30488d2fdbb43 (diff)
Fix error adding category through UI
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4144 Change-Id: I9227131ad89c3135f5ab3eceed4d34ff8fd1627d (cherry picked from commit b95ca35cd3fc0f68a6eb2d09bb347d9ba659caf3)
-rw-r--r--catalog-ui/src/app/view-models/workspace/tabs/general/general-view-model.ts2
1 files changed, 1 insertions, 1 deletions
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);
}