From e8f3f47c0bdbb91efcb637f242788f7356ea58df Mon Sep 17 00:00:00 2001 From: Mohammed Abad Date: Sun, 21 Apr 2024 17:05:22 +0100 Subject: [PATCH] minor change to theme service --- frontend/src/app/core/services/theme.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/core/services/theme.service.ts b/frontend/src/app/core/services/theme.service.ts index 294a4a5..b68e814 100644 --- a/frontend/src/app/core/services/theme.service.ts +++ b/frontend/src/app/core/services/theme.service.ts @@ -16,11 +16,11 @@ export class ThemeService { } private loadTheme(): void { - if (!localStorage.getItem('theme')) { - this.theme = this.getSystemTheme(); - } else { + if (localStorage.getItem('theme')) { this.theme = (localStorage.getItem('theme') as 'light' | 'dark') || 'light'; + } else { + this.theme = this.getSystemTheme(); } this.applyTheme(); }