summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-08-15 20:34:06 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-08-15 20:34:06 +0900
commit6c1f03eefd005dd403de5592aed0f8ea89633b96 (patch)
tree5b10b523a4f131c36ef860767b3eac411c539c91
parentfeat: ノートの翻訳機能 (diff)
downloadsharkey-6c1f03eefd005dd403de5592aed0f8ea89633b96.tar.gz
sharkey-6c1f03eefd005dd403de5592aed0f8ea89633b96.tar.bz2
sharkey-6c1f03eefd005dd403de5592aed0f8ea89633b96.zip
enhance(client): Improve stability of version comparison
-rw-r--r--src/client/init.ts7
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) {
}
}