2
0
mirror of https://github.com/frappe/books.git synced 2025-01-07 00:53:58 +00:00

fix: startup error : systemSettings is not single schema

This commit is contained in:
akshayitzme 2024-12-24 23:31:49 +05:30
parent ada4952107
commit d5e38d6843
2 changed files with 4 additions and 3 deletions

View File

@ -16,6 +16,7 @@ export default class SystemSettings extends Doc {
currency?: string;
version?: string;
instanceId?: string;
darkMode?: boolean;
validations: ValidationMap = {
displayPrecision(value: DocValue) {

View File

@ -135,9 +135,9 @@ export default defineComponent({
},
async mounted() {
await this.setInitialScreen();
const { darkMode } = await fyo.doc.getDoc('SystemSettings');
setDarkMode(!!darkMode);
this.darkMode = !!darkMode;
const darkMode = !!fyo.singles.SystemSettings?.darkMode;
setDarkMode(darkMode);
this.darkMode = darkMode;
},
methods: {
async setInitialScreen(): Promise<void> {