fix
This commit is contained in:
parent
fda58058a3
commit
3b850ae223
1 changed files with 6 additions and 5 deletions
|
|
@ -272,20 +272,21 @@ export const useUserHighlightStore = defineStore('user_highlight', {
|
||||||
|
|
||||||
let { recent, stale, needUpload } = _getRecentData(cache, live)
|
let { recent, stale, needUpload } = _getRecentData(cache, live)
|
||||||
|
|
||||||
|
const userNew = userData.created_at > NEW_USER_DATE
|
||||||
|
let dirty = false
|
||||||
|
|
||||||
const vuexState = await storage.getItem('vuex-lz')
|
const vuexState = await storage.getItem('vuex-lz')
|
||||||
const { highlight } = vuexState.config
|
const { highlight } = vuexState.config
|
||||||
Object.entries(highlight).forEach(([user, value]) => {
|
Object.entries(highlight).forEach(([user, value]) => {
|
||||||
if ((highlight[user]._migrated || 0) < 2) {
|
if ((highlight[user]._migrated || 0) < 1) {
|
||||||
|
dirty = true
|
||||||
this.set({ user, value: clone(value) })
|
this.set({ user, value: clone(value) })
|
||||||
// vuexState.config.highlight[user]._migrated = 1
|
vuexState.config.highlight[user]._migrated = 1
|
||||||
console.log(user, value, this.highlight[user])
|
console.log(user, value, this.highlight[user])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
storage.setItem('vuex-lz', vuexState)
|
storage.setItem('vuex-lz', vuexState)
|
||||||
|
|
||||||
const userNew = userData.created_at > NEW_USER_DATE
|
|
||||||
let dirty = false
|
|
||||||
|
|
||||||
if (recent === null) {
|
if (recent === null) {
|
||||||
console.debug(
|
console.debug(
|
||||||
`Data is empty, initializing for ${userNew ? 'new' : 'existing'} user`,
|
`Data is empty, initializing for ${userNew ? 'new' : 'existing'} user`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue