mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: wait for migrations
This commit is contained in:
parent
345c5cec99
commit
0038b32271
3 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ export const migration: Migration = {
|
|||
accessToken?: string
|
||||
}
|
||||
|
||||
onConfigOutdated(version, async configs => {
|
||||
await onConfigOutdated(version, async configs => {
|
||||
for (const key of Object.keys(configs)) {
|
||||
if (
|
||||
typeof configs[key] === 'object' &&
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const migration: Migration = {
|
|||
copySnippetButton: boolean
|
||||
}
|
||||
|
||||
onConfigOutdated(version, async configs => {
|
||||
await onConfigOutdated(version, async configs => {
|
||||
const key = 'platform_github.com'
|
||||
const config = configs[key]
|
||||
if (typeof config === 'object' && config !== null && 'copySnippetButton' in config) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export async function onConfigOutdated<T extends { [key: string]: any }>(
|
|||
|
||||
if (config && config.configVersion < configVersion) {
|
||||
const { configVersion, ...restConfig } = config
|
||||
runIfOutdated(restConfig as T)
|
||||
await runIfOutdated(restConfig as T)
|
||||
await storageHelper.set({ configVersion })
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue