mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 21:10:12 +02:00
assert appstore state migration return type
This commit is contained in:
@@ -239,10 +239,10 @@ export const useAppStore = createWithEqualityFn<AppSlice>()(
|
||||
},
|
||||
migrate: (persistedState, version) => {
|
||||
if (version <= 2) {
|
||||
return {} as AppState;
|
||||
return {} as AppSlice;
|
||||
}
|
||||
|
||||
const state = persistedState as AppState;
|
||||
const state = persistedState as AppSlice;
|
||||
if (version <= 4 && !state.sidebar.rightHeight) {
|
||||
state.sidebar.rightHeight = '320px';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user