From f82f57944a6cf0151cf611e938acda0cb6ea9d65 Mon Sep 17 00:00:00 2001 From: "andre.schmid" Date: Fri, 20 May 2022 19:14:00 +0100 Subject: Fix exception while loading VF "General" page The exception is thrown when accessing a VF General page from a VF that is not associated to a CSAR file (Imported from CSAR file). The code is trying to access the CSAR file that does not exist. Change-Id: I0df34e75911e4a912f50ff8993637952e32d48c6 Issue-ID: SDC-4013 Signed-off-by: andre.schmid --- .../src/app/view-models/workspace/tabs/general/general-view-model.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'catalog-ui/src/app') 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..6b0d49029a 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 @@ -216,7 +216,9 @@ export class GeneralViewModel { if(this.$stateParams.componentCsar && this.$scope.component.lifecycleState === 'NOT_CERTIFIED_CHECKIN' && !this.$scope.isCreateMode()) { this.$scope.importedToscaBrowseFileText = this.$scope.originComponent.name + ' (' + (this.$scope.originComponent as Resource).csarVersion + ')'; } else { - this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[csarUUID][csarVersion]; + if (onboardCsarFilesMap && onboardCsarFilesMap[csarUUID]) { + this.$scope.importedToscaBrowseFileText = onboardCsarFilesMap[csarUUID][csarVersion]; + } } } } -- cgit 1.2.3-korg