diff --git a/src/stores/sync_config.js b/src/stores/sync_config.js index d5a5298be..53401b9bd 100644 --- a/src/stores/sync_config.js +++ b/src/stores/sync_config.js @@ -677,6 +677,7 @@ export const useSyncConfigStore = defineStore('sync_config', { // Various migrations console.debug('Migrating from old config') const vuexState = (await storage.getItem('vuex-lz')) ?? {} + console.log('### sc', vuexState) const config = vuexState.config ?? {} const migratedEntries = new Set(config._syncMigration ?? []) diff --git a/src/stores/user_highlight.js b/src/stores/user_highlight.js index ca61c6e4e..737c87b49 100644 --- a/src/stores/user_highlight.js +++ b/src/stores/user_highlight.js @@ -278,21 +278,22 @@ export const useUserHighlightStore = defineStore('user_highlight', { let dirty = false const vuexState = (await storage.getItem('vuex-lz')) ?? {} - vuexState.config = vuexState.config ?? {} - const highlight = vuexState.config.highlight ?? {} + const config = vuexState.config ?? {} + const highlight = config.highlight ?? {} Object.entries(highlight).forEach(([user, value]) => { if ((highlight[user]._migrated || 0) < 1) { dirty = true needUpload = true this.set({ user, value: clone(value) }) - vuexState.config.highlight[user]._migrated = 1 + highlight[user]._migrated = 1 console.debug( `[HIGHLIGHT] Migrating user ${user}: ${JSON.stringify(value)}`, ) } }) - storage.setItem('vuex-lz', vuexState) + console.log('### uh', vuexState) + //storage.setItem('vuex-lz', { ...vuexState, config: { ...config, highlight } }) if (recent === null) { console.debug(