From 42517a9fb9630dd9cf05853a31d51eb763e1db7e Mon Sep 17 00:00:00 2001 From: Emma Date: Mon, 23 Jan 2023 10:37:07 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20Clean-up=20update=20checking=20l?= =?UTF-8?q?ogic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/App.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index 242d8f73d68a4..28637e1831f57 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -227,21 +227,14 @@ export default defineComponent({ .then((json) => { const tagName = json[0].tag_name const tagNameParts = tagName.split('.') - let versionNumber = tagNameParts[tagNameParts.length - 1] - // if the tag is a nightly release - if (tagName.indexOf('-nightly-') !== -1) { - versionNumber = tagName.split('-nightly-')[1] - } + const versionNumber = tagNameParts[tagNameParts.length - 1] this.updateChangelog = marked.parse(json[0].body) this.changeLogTitle = json[0].name const message = this.$t('Version $ is now available! Click for more details') this.updateBannerMessage = message.replace('$', versionNumber) const versionParts = packageDetails.version.split('.') - let appVersion = versionParts[versionParts.length - 1] - if (appVersion.indexOf('-nightly-') !== -1) { - appVersion = appVersion.split('-nightly-')[1] - } + const appVersion = versionParts[versionParts.length - 1] if (parseInt(versionNumber) > parseInt(appVersion)) { this.showUpdatesBanner = true }