Skip to content

Commit

Permalink
put both statements inside if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
nevio18324 committed Dec 23, 2024
1 parent 74ff4fc commit 38189d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/app/shared/custom/scoring/scoring.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ export class ScoringComponent implements OnInit, AfterViewInit, OnChanges {

if (this.keyResult.keyResultType == 'metric') {
this.labelPercentage.subscribe((value) => {
if (this.valueLabel) this.valueLabel.nativeElement.style.width = value + '%';
this.changeDetectionRef.detectChanges();
if (this.valueLabel) {
this.valueLabel.nativeElement.style.width = value + '%';
this.changeDetectionRef.detectChanges();
}
});
}

Expand Down

0 comments on commit 38189d3

Please sign in to comment.