From: JvD_Ericsson Date: Tue, 16 May 2023 10:35:17 +0000 (+0100) Subject: Error in console when no default custom tosca functions X-Git-Tag: 1.13.0~26 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F134569%2F3;p=sdc.git Error in console when no default custom tosca functions Issue-ID: SDC-4500 Signed-off-by: JvD_Ericsson Change-Id: Iebc394b42863dd1e72a40095ea04d04495af57d3 --- diff --git a/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts b/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts index 0003f53403..812f157c1b 100644 --- a/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts +++ b/catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts @@ -659,7 +659,7 @@ export class TopologyTemplateService { getDefaultCustomFunction(type='ALL'): Observable { return this.http.get(this.baseUrl + "customToscaFunctions/" + type) - .pipe(map(response => response.defaultCustomToscaFunction ? response.defaultCustomToscaFunction : undefined)); + .pipe(map(response => response && response.defaultCustomToscaFunction ? response.defaultCustomToscaFunction : [])); } }