Commit 7121fbf8c3d6831624673f5f8f54068e34307681

Authored by Vladyslav
Committed by GitHub
1 parent 52d07fe0

UI: Improvement processing variable tag

@@ -73,16 +73,13 @@ export class OtaUpdateComponent extends EntityComponent<OtaPackage> implements O @@ -73,16 +73,13 @@ export class OtaUpdateComponent extends EntityComponent<OtaPackage> implements O
73 } 73 }
74 }); 74 });
75 combineLatest([ 75 combineLatest([
76 - this.entityForm.get('title').valueChanges.pipe(startWith(''), takeUntil(this.destroy$)),  
77 - this.entityForm.get('version').valueChanges.pipe(startWith(''), takeUntil(this.destroy$)) 76 + this.entityForm.get('title').valueChanges.pipe(startWith('')),
  77 + this.entityForm.get('version').valueChanges.pipe(startWith(''))
78 ]).pipe( 78 ]).pipe(
79 filter(() => this.entityForm.get('tag').pristine), 79 filter(() => this.entityForm.get('tag').pristine),
80 takeUntil(this.destroy$) 80 takeUntil(this.destroy$)
81 ).subscribe(([title, version]) => { 81 ).subscribe(([title, version]) => {
82 - let tag = `${title} ${version}`.trim();  
83 - if (tag === '') {  
84 - tag = '';  
85 - } 82 + const tag = (`${title} ${version}`).trim();
86 this.entityForm.get('tag').patchValue(tag); 83 this.entityForm.get('tag').patchValue(tag);
87 }); 84 });
88 } 85 }