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:
parent
bf48f075ba
commit
3f9b90241a
@ -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');
|
||||
},
|
||||
|
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user