mirror of
https://github.com/frappe/books.git
synced 2024-12-22 19:09:01 +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.searcher = null;
|
||||||
this.companyName = '';
|
this.companyName = '';
|
||||||
},
|
},
|
||||||
async toggleDMode(): Promise<void> {
|
toggleDMode(): void {
|
||||||
toggleDarkMode();
|
toggleDarkMode();
|
||||||
this.darkMode = fyo.config.get('darkMode');
|
this.darkMode = fyo.config.get('darkMode');
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { fyo } from 'src/initFyo';
|
import { fyo } from 'src/initFyo';
|
||||||
|
|
||||||
export async function toggleDarkMode(): Promise<void> {
|
export function toggleDarkMode(): void {
|
||||||
const darkMode = fyo.config.get('darkMode');
|
const darkMode = fyo.config.get('darkMode');
|
||||||
if (darkMode) {
|
if (darkMode) {
|
||||||
document.documentElement.classList.remove('dark');
|
document.documentElement.classList.remove('dark');
|
||||||
@ -12,7 +12,7 @@ export async function toggleDarkMode(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function setDarkMode(): void {
|
export function setDarkMode(): void {
|
||||||
var darkMode = fyo.config.get('darkMode');
|
let darkMode = fyo.config.get('darkMode');
|
||||||
|
|
||||||
/* Fetching system theme */
|
/* Fetching system theme */
|
||||||
if (darkMode === undefined){
|
if (darkMode === undefined){
|
||||||
|
Loading…
Reference in New Issue
Block a user