mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
[Backport staging] Fix macos update check exploding (#945)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
da9ab70b39
commit
068fc63a53
@ -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}})`,
|
||||
);
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user