Skip to content

Commit

Permalink
Add SSR checks
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Nov 1, 2023
1 parent 143c9b0 commit 5f10880
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/app/showcase/pages/landing/landing.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,12 +321,16 @@ export class LandingComponent implements OnInit, OnDestroy {
}

changeFont() {
this.editor.nativeElement.style.setProperty('--dd-font', this.selectedFont);
if(isPlatformBrowser(this.platformId)){
this.editor?.nativeElement.style.setProperty('--dd-font', this.selectedFont);
}
}

changeDesignerTheme(color, darker) {
this.editor.nativeElement.style.setProperty('--dd-primary', color);
this.editor.nativeElement.style.setProperty('--dd-primary-darker', darker);
if(isPlatformBrowser(this.platformId)){
this.editor?.nativeElement.style.setProperty('--dd-primary', color);
this.editor?.nativeElement.style.setProperty('--dd-primary-darker', darker);
}
}

onActivityChange(event) {
Expand Down

1 comment on commit 5f10880

@vercel
Copy link

@vercel vercel bot commented on 5f10880 Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.