chore:config
This commit is contained in:
parent
f68ee06f25
commit
7aefaa919f
@ -38,6 +38,7 @@ export function useCoreConfig() {
|
|||||||
const loadCoreConfig = async () => {
|
const loadCoreConfig = async () => {
|
||||||
const store = await createConfigStore()
|
const store = await createConfigStore()
|
||||||
const savedConfig = await store.get<CoreConfig>('core_config')
|
const savedConfig = await store.get<CoreConfig>('core_config')
|
||||||
|
console.log(savedConfig,'defaultConfig')
|
||||||
|
|
||||||
if (savedConfig) {
|
if (savedConfig) {
|
||||||
return savedConfig
|
return savedConfig
|
||||||
@ -46,7 +47,6 @@ export function useCoreConfig() {
|
|||||||
const defaultConfig = await commands.getDefaultCoreConfig()
|
const defaultConfig = await commands.getDefaultCoreConfig()
|
||||||
await store.set('core_config', defaultConfig)
|
await store.set('core_config', defaultConfig)
|
||||||
await store.save()
|
await store.save()
|
||||||
|
|
||||||
return defaultConfig
|
return defaultConfig
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user