mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +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) => {
|
migrate: (persistedState, version) => {
|
||||||
if (version <= 2) {
|
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) {
|
if (version <= 4 && !state.sidebar.rightHeight) {
|
||||||
state.sidebar.rightHeight = '320px';
|
state.sidebar.rightHeight = '320px';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user