diff --git a/src/ng2fittext.directive.ts b/src/ng2fittext.directive.ts index 54958f7..1e06fa2 100644 --- a/src/ng2fittext.directive.ts +++ b/src/ng2fittext.directive.ts @@ -53,8 +53,8 @@ export class Ng2FittextDirective implements AfterViewInit, OnInit { this.setFontSize(this.container.clientHeight); } else { this.setFontSize(this.container.clientWidth); - this.el.nativeElement.style.setProperty('will-change', 'content'); } + this.el.nativeElement.style.setProperty('will-change', 'content'); } ngAfterViewInit() {