From a6553b5d4a6721cbe6a26e416895941e11e361cc Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Aug 2021 20:34:06 +0900 Subject: [PATCH] enhance(client): Improve stability of version comparison --- src/client/init.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/client/init.ts b/src/client/init.ts index 2feeaf0ce..1580ef3e0 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -207,8 +207,11 @@ if (lastVersion !== version) { // テーマリビルドするため localStorage.removeItem('theme'); - if (lastVersion != null && compareVersions(version, lastVersion) === 1) { - popup(import('@client/components/updated.vue'), {}, {}, 'closed'); + try { // 変なバージョン文字列来るとcompareVersionsでエラーになるため + if (lastVersion != null && compareVersions(version, lastVersion) === 1) { + popup(import('@client/components/updated.vue'), {}, {}, 'closed'); + } + } catch (e) { } }