2
0
mirror of https://github.com/frappe/books.git synced 2024-12-22 10:58:59 +00:00

fix: remove unnecessary async from toggleDarkMode function

This commit is contained in:
pu-raihan 2024-08-20 10:36:34 +05:30
parent bf48f075ba
commit 3f9b90241a
2 changed files with 3 additions and 3 deletions

View File

@ -260,7 +260,7 @@ export default defineComponent({
this.searcher = null;
this.companyName = '';
},
async toggleDMode(): Promise<void> {
toggleDMode(): void {
toggleDarkMode();
this.darkMode = fyo.config.get('darkMode');
},

View File

@ -1,6 +1,6 @@
import { fyo } from 'src/initFyo';
export async function toggleDarkMode(): Promise<void> {
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<void> {
}
export function setDarkMode(): void {
var darkMode = fyo.config.get('darkMode');
let darkMode = fyo.config.get('darkMode');
/* Fetching system theme */
if (darkMode === undefined){