Error in console when no default custom tosca functions 69/134569/3
authorJvD_Ericsson <jeff.van.dam@est.tech>
Tue, 16 May 2023 10:35:17 +0000 (11:35 +0100)
committerMichael Morris <michael.morris@est.tech>
Wed, 17 May 2023 08:48:10 +0000 (08:48 +0000)
Issue-ID: SDC-4500
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: Iebc394b42863dd1e72a40095ea04d04495af57d3

catalog-ui/src/app/ng2/services/component-services/topology-template.service.ts

index 0003f53..812f157 100644 (file)
@@ -659,7 +659,7 @@ export class TopologyTemplateService {
 
     getDefaultCustomFunction(type='ALL'): Observable<CustomToscaFunction[]> {
         return this.http.get<DefaultCustomFunctions>(this.baseUrl + "customToscaFunctions/" + type)
-        .pipe(map(response => response.defaultCustomToscaFunction ? response.defaultCustomToscaFunction : undefined));
+        .pipe(map(response => response && response.defaultCustomToscaFunction  ? response.defaultCustomToscaFunction : []));
     }
 
 }