summaryrefslogtreecommitdiffstats
path: root/catalog-ui/src
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2022-08-26 15:47:40 +0100
committerMichaelMorris <michael.morris@est.tech>2022-08-26 15:47:43 +0100
commitb95ca35cd3fc0f68a6eb2d09bb347d9ba659caf3 (patch)
treec94a2a81b77100e29d98d9de650301e83f6cfae8 /catalog-ui/src
parentf156da1d07f6c2703221e604cfc410b0e5f8f4c8 (diff)
Fix error adding category through UI
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4144 Change-Id: I9227131ad89c3135f5ab3eceed4d34ff8fd1627d
Diffstat (limited to 'catalog-ui/src')
-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 0057ba4669..ad96e74a2b 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
@@ -875,7 +875,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);
}