From 57b004431f31b2e5c9888469098a5e6cb360bc49 Mon Sep 17 00:00:00 2001 From: Preston Date: Fri, 18 Dec 2020 11:57:20 -0500 Subject: [PATCH] Add better release check logic --- src/renderer/App.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index 30b19cdc..95c7aad0 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -172,7 +172,15 @@ export default Vue.extend({ const message = this.$t('Version $ is now available! Click for more details') this.updateBannerMessage = message.replace('$', versionNumber) - if (version < versionNumber) { + + const appVersion = version.split('.') + const latestVersion = versionNumber.split('.') + + if (parseInt(appVersion[0]) < parseInt(latestVersion[0])) { + this.showUpdatesBanner = true + } else if (parseInt(appVersion[1]) < parseInt(latestVersion[1])) { + this.showUpdatesBanner = true + } else if (parseInt(appVersion[2]) < parseInt(latestVersion[2])) { this.showUpdatesBanner = true } }).fail((xhr, textStatus, error) => {