From 85a1448b43908579257e9a7ba4724d11e9cd1531 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 10 Aug 2020 12:27:28 +0300 Subject: [PATCH] Correction bulk provision without telemetry --- ui-ngx/src/app/core/http/entity.service.ts | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/ui-ngx/src/app/core/http/entity.service.ts b/ui-ngx/src/app/core/http/entity.service.ts index 1773582ea7..7034029e93 100644 --- a/ui-ngx/src/app/core/http/entity.service.ts +++ b/ui-ngx/src/app/core/http/entity.service.ts @@ -937,16 +937,20 @@ export class EntityService { ); observables.push(observable); } - return forkJoin(observables).pipe( - map((response) => { - const hasError = response.filter((status) => status === 'error').length > 0; - if (hasError) { - throw Error(); - } else { - return response; - } - }) - ); + if (observables.length) { + return forkJoin(observables).pipe( + map((response) => { + const hasError = response.filter((status) => status === 'error').length > 0; + if (hasError) { + throw Error(); + } else { + return response; + } + }) + ); + } else { + return of(null); + } } private getStateEntityInfo(filter: EntityAliasFilter, stateParams: StateParams): {entityId: EntityId} {