From 087d44cbb9d388c3a6c720ee9a6349bcaf6a1f04 Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Tue, 16 May 2023 11:35:17 +0100 Subject: [PATCH] Error in console when no default custom tosca functions Issue-ID: SDC-4500 Signed-off-by: JvD_Ericsson Change-Id: Iebc394b42863dd1e72a40095ea04d04495af57d3 --- .../app/ng2/services/component-services/topology-template.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 : [])); } } -- 2.16.6