From 53156abf1bfd446f88314504b1c162dd2f75c466 Mon Sep 17 00:00:00 2001 From: Wang Guan Date: Tue, 22 Oct 2024 21:35:13 +0900 Subject: [PATCH] make coderabbit happy --- app/store/sync.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/store/sync.ts b/app/store/sync.ts index 4db38f40d..c17385b0b 100644 --- a/app/store/sync.ts +++ b/app/store/sync.ts @@ -130,7 +130,7 @@ export const useSyncStore = createPersistStore( }), { name: StoreKey.Sync, - version: 1.2, + version: 1.3, migrate(persistedState, version) { const newState = persistedState as typeof DEFAULT_SYNC_STATE; @@ -148,6 +148,10 @@ export const useSyncStore = createPersistStore( } } + if (version < 1.3) { + newState.autoSync = { ...DEFAULT_SYNC_STATE.autoSync }; + } + return newState as any; }, },