diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-15 20:34:06 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-15 20:34:06 +0900 |
| commit | 6c1f03eefd005dd403de5592aed0f8ea89633b96 (patch) | |
| tree | 5b10b523a4f131c36ef860767b3eac411c539c91 /src/client/init.ts | |
| parent | feat: ノートの翻訳機能 (diff) | |
| download | sharkey-6c1f03eefd005dd403de5592aed0f8ea89633b96.tar.gz sharkey-6c1f03eefd005dd403de5592aed0f8ea89633b96.tar.bz2 sharkey-6c1f03eefd005dd403de5592aed0f8ea89633b96.zip | |
enhance(client): Improve stability of version comparison
Diffstat (limited to 'src/client/init.ts')
| -rw-r--r-- | src/client/init.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/init.ts b/src/client/init.ts index 2feeaf0ce1..1580ef3e08 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) { } } |