enhance(client): Improve stability of version comparison

This commit is contained in:
syuilo 2021-08-15 20:34:06 +09:00
parent b61367e8aa
commit a6553b5d4a

View file

@ -207,8 +207,11 @@ if (lastVersion !== version) {
// テーマリビルドするため // テーマリビルドするため
localStorage.removeItem('theme'); localStorage.removeItem('theme');
if (lastVersion != null && compareVersions(version, lastVersion) === 1) { try { // 変なバージョン文字列来るとcompareVersionsでエラーになるため
popup(import('@client/components/updated.vue'), {}, {}, 'closed'); if (lastVersion != null && compareVersions(version, lastVersion) === 1) {
popup(import('@client/components/updated.vue'), {}, {}, 'closed');
}
} catch (e) {
} }
} }