fix: write back config version

This commit is contained in:
EnixCoda 2021-06-07 17:51:07 +08:00
parent 8184b8699e
commit 4e0bfee44e
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -25,7 +25,7 @@ export async function onConfigOutdated<T extends { [key: string]: any }>(
const config = await storageHelper.get<Storage>()
if (config && config.configVersion < configVersion) {
const { configVersion, ...restConfig } = config
const { configVersion: $configVersion, ...restConfig } = config
await runIfOutdated(restConfig as T)
await storageHelper.set({ configVersion })
}