From 3d58c7c3bc44e552e6b3521b76ea800d2cd8a813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20S=C3=A1ez=20Garc=C3=ADa?= Date: Sun, 28 Jan 2024 12:45:05 +0100 Subject: [PATCH] refactor(SSR): :construction: removing window.getComputedStyle() --- src/app/shared/directives/loading.directive.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/shared/directives/loading.directive.ts b/src/app/shared/directives/loading.directive.ts index 5a8aa28..dd11216 100644 --- a/src/app/shared/directives/loading.directive.ts +++ b/src/app/shared/directives/loading.directive.ts @@ -31,11 +31,9 @@ export class LoadingDirective implements AfterViewInit { skeletonComponentRef: ComponentRef | undefined; ngAfterViewInit(): void { - this.ref.detectChanges(); - this.fontSizeValue = parseFloat(window.getComputedStyle(this.elementRef.nativeElement).fontSize) / 2; - this.isLoading$.subscribe((isLoading) => { this.handleLoading(isLoading); + this.ref.detectChanges(); }); }