From 5c92b9971ff2861f29f7f5cc443213c174854989 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Mon, 1 Nov 2021 22:11:36 +0800 Subject: [PATCH] fix: resolve configVersion of value `null` --- src/utils/config/migrations/1.0.1.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/config/migrations/1.0.1.ts b/src/utils/config/migrations/1.0.1.ts index 7f16c3d..45d2a1b 100644 --- a/src/utils/config/migrations/1.0.1.ts +++ b/src/utils/config/migrations/1.0.1.ts @@ -16,7 +16,12 @@ export const migration: Migration = { 'intelligentToggle', 'icons', ]) - if (config && (!('configVersion' in config) || config.configVersion < version)) { + if ( + config && + (!('configVersion' in config) || + config.configVersion === null || + config.configVersion < version) + ) { await storageHelper.set({ platform_GitHub: config, configVersion: version }) } },