fix: set default zoomFactor in settings

This commit is contained in:
suyao 2025-05-11 03:00:11 +08:00
parent 8a99eea28a
commit 428b1fbe40
No known key found for this signature in database
2 changed files with 11 additions and 1 deletions

View File

@ -46,7 +46,7 @@ const persistedReducer = persistReducer(
{ {
key: 'cherry-studio', key: 'cherry-studio',
storage, storage,
version: 99, version: 100,
blacklist: ['runtime', 'messages', 'messageBlocks'], blacklist: ['runtime', 'messages', 'messageBlocks'],
migrate migrate
}, },

View File

@ -1296,6 +1296,16 @@ const migrateConfig = {
} catch (error) { } catch (error) {
return state return state
} }
},
'100': (state: RootState) => {
try {
if (!state.settings.zoomFactor) {
state.settings.zoomFactor = 1
}
return state
} catch (error) {
return state
}
} }
} }