From 7121fbf8c3d6831624673f5f8f54068e34307681 Mon Sep 17 00:00:00 2001 From: Vladyslav Date: Fri, 23 Jul 2021 00:01:24 +0300 Subject: [PATCH] UI: Improvement processing variable tag --- .../home/pages/ota-update/ota-update.component.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.ts b/ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.ts index 50c2d8bb56..7ea9ef2e3b 100644 --- a/ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.ts +++ b/ui-ngx/src/app/modules/home/pages/ota-update/ota-update.component.ts @@ -73,16 +73,13 @@ export class OtaUpdateComponent extends EntityComponent implements O } }); combineLatest([ - this.entityForm.get('title').valueChanges.pipe(startWith(''), takeUntil(this.destroy$)), - this.entityForm.get('version').valueChanges.pipe(startWith(''), takeUntil(this.destroy$)) + this.entityForm.get('title').valueChanges.pipe(startWith('')), + this.entityForm.get('version').valueChanges.pipe(startWith('')) ]).pipe( filter(() => this.entityForm.get('tag').pristine), takeUntil(this.destroy$) ).subscribe(([title, version]) => { - let tag = `${title} ${version}`.trim(); - if (tag === '') { - tag = ''; - } + const tag = (`${title} ${version}`).trim(); this.entityForm.get('tag').patchValue(tag); }); }