diff --git a/src/App.vue b/src/App.vue index dc4e3b85..e6573329 100644 --- a/src/App.vue +++ b/src/App.vue @@ -260,7 +260,7 @@ export default defineComponent({ this.searcher = null; this.companyName = ''; }, - async toggleDMode(): Promise { + toggleDMode(): void { toggleDarkMode(); this.darkMode = fyo.config.get('darkMode'); }, diff --git a/src/utils/theme.ts b/src/utils/theme.ts index 86d2b2df..40ea54f5 100644 --- a/src/utils/theme.ts +++ b/src/utils/theme.ts @@ -1,6 +1,6 @@ import { fyo } from 'src/initFyo'; -export async function toggleDarkMode(): Promise { +export function toggleDarkMode(): void { const darkMode = fyo.config.get('darkMode'); if (darkMode) { document.documentElement.classList.remove('dark'); @@ -12,7 +12,7 @@ export async function toggleDarkMode(): Promise { } export function setDarkMode(): void { - var darkMode = fyo.config.get('darkMode'); + let darkMode = fyo.config.get('darkMode'); /* Fetching system theme */ if (darkMode === undefined){