Skip to content

Commit

Permalink
chore: correctly handle checkForUpdates result
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Feb 2, 2025
1 parent 09a082a commit 9a4df1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions satellite/src/electronUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class ElectronUpdater {
})
}

installPending(): void {
private installPending(): void {
autoUpdater
.downloadUpdate()
.then(() => {
Expand All @@ -65,7 +65,9 @@ export class ElectronUpdater {
.checkForUpdates()
.then((info) => {
if (notifyWithDialog) {
if (info) {
// HACK: If there is a cancellation token, it found an update.
// This is not a good test, but the only other ways require comparing version numbers the same as electron-updater, or to listen to the emitted events instead
if (info?.cancellationToken) {
dialog
.showMessageBox({
title: 'Companion Satellite',
Expand Down

0 comments on commit 9a4df1d

Please sign in to comment.