From 68954f8db18fa5fdf4aac20e7c12137fbd0d5bf1 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 22 Jan 2020 20:11:00 +0200 Subject: [PATCH] Minor improvements --- ui-ngx/src/app/core/services/utils.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/core/services/utils.service.ts b/ui-ngx/src/app/core/services/utils.service.ts index e5c6196412..3ab20bb36d 100644 --- a/ui-ngx/src/app/core/services/utils.service.ts +++ b/ui-ngx/src/app/core/services/utils.service.ts @@ -360,7 +360,10 @@ export class UtilsService { } public createLabelFromDatasource(datasource: Datasource, pattern: string) { - let label = deepClone(pattern); + let label = pattern; + if (!datasource) { + return label; + } let match = varsRegex.exec(pattern); while (match !== null) { const variable = match[0];