fix localStorage restore

This commit is contained in:
Qing 2022-06-28 22:58:50 +08:00
parent 0daa27e11a
commit dc950ed3fe

View File

@ -67,7 +67,7 @@ const localStorageEffect =
if (savedValue != null) { if (savedValue != null) {
const storageSettings = JSON.parse(savedValue) const storageSettings = JSON.parse(savedValue)
storageSettings.show = false storageSettings.show = false
setSelf(storageSettings) setSelf({ ...settingStateDefault, ...storageSettings })
} }
onSet((newValue: Settings, _: string, isReset: boolean) => onSet((newValue: Settings, _: string, isReset: boolean) =>