Skip to content

Commit

Permalink
Fix macos update check exploding (#944)
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored May 5, 2023
1 parent d3f687d commit d8bd12a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ async function safeCheckForUpdate(): Promise<void> {
try {
const res = await global.fetch(feedUrl);
const { currentRelease } = await res.json();
const latestVersionDownloaded = latestUpdateDownloaded.releaseName;
const latestVersionDownloaded = latestUpdateDownloaded?.releaseName;
console.info(
`Latest version from release download: ${currentRelease} (current: ${app.getVersion()}, most recent downloaded ${latestVersionDownloaded}})`,
);
Expand Down Expand Up @@ -131,7 +131,7 @@ interface ICachedUpdate {
}

// cache the latest update which has been downloaded as electron offers no api to read it
let latestUpdateDownloaded: ICachedUpdate;
let latestUpdateDownloaded: ICachedUpdate | undefined;
autoUpdater
.on("update-available", function () {
ipcChannelSendUpdateStatus(true);
Expand Down

0 comments on commit d8bd12a

Please sign in to comment.