fix console error
This commit is contained in:
parent
3b850ae223
commit
9ddbd625f6
1 changed files with 4 additions and 4 deletions
|
|
@ -413,7 +413,7 @@ export const _resetPrefs = (
|
||||||
return totalPrefs
|
return totalPrefs
|
||||||
}
|
}
|
||||||
|
|
||||||
export const _doMigrations = async (data) => {
|
export const _doMigrations = async (data, setPreference) => {
|
||||||
console.log('TEST', data._version)
|
console.log('TEST', data._version)
|
||||||
|
|
||||||
if (data._version < VERSION) {
|
if (data._version < VERSION) {
|
||||||
|
|
@ -425,7 +425,7 @@ export const _doMigrations = async (data) => {
|
||||||
// Migrate old config to sync config
|
// Migrate old config to sync config
|
||||||
const vuexState = await storage.getItem('vuex-lz')
|
const vuexState = await storage.getItem('vuex-lz')
|
||||||
defaultStateKeys.forEach(key => {
|
defaultStateKeys.forEach(key => {
|
||||||
this.setPreference({ path: `simple.${key}`, value: vuexState.config[key] })
|
setPreference({ path: `simple.${key}`, value: vuexState.config[key] })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -636,8 +636,8 @@ export const useSyncConfigStore = defineStore('sync_config', {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
recent = recent && await _doMigrations(recent)
|
recent = recent && await _doMigrations(recent, this.setPreference)
|
||||||
stale = stale && await _doMigrations(stale)
|
stale = stale && await _doMigrations(stale, this.setPreference)
|
||||||
|
|
||||||
if (!needUpload && recent && stale) {
|
if (!needUpload && recent && stale) {
|
||||||
console.debug('Checking if data needs merging...')
|
console.debug('Checking if data needs merging...')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue