diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 8d6390f02..1cf10bab6 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -201,12 +201,15 @@ export class AppComponent implements OnDestroy, OnInit { const themeColor = getCssVariable( isDarkTheme ? '--dark-background' : '--light-background' ); - const metaTag = this.document.querySelector('meta[name="theme-color"]'); + if (isDarkTheme) { this.document.body.classList.add('is-dark-theme'); } else { this.document.body.classList.remove('is-dark-theme'); } - metaTag.setAttribute('content', themeColor); + + this.document + .querySelector('meta[name="theme-color"]') + .setAttribute('content', themeColor); } }