This commit is contained in:
2021-04-07 12:28:05 +02:00
parent 46704211fa
commit 72ee5d7641
9 changed files with 26 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ export default class TrayUtility {
static setStatus(status: string) {
this.menu[0].label = status
this.tray.setContextMenu(this.build())
this.tray?.setContextMenu(this.build())
}
private static build() {

View File

@@ -20,8 +20,9 @@ export default class Updater {
url,
})
// parse tags and reverse sort them to get the highest
const tags = data.map((d) => semver.coerce(d.name)).sort(semver.rcompare)
const tags = data.map((d: any) => semver.coerce(d.name)).sort(semver.rcompare)
const latest = tags[0]
if (!current) throw new Error('Could not determine current version')
if (semver.lt(current, latest)) {
logger.info('New version available')
dialog