mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-31 13:39:58 +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 {
|
try {
|
||||||
const res = await global.fetch(feedUrl);
|
const res = await global.fetch(feedUrl);
|
||||||
const { currentRelease } = await res.json();
|
const { currentRelease } = await res.json();
|
||||||
const latestVersionDownloaded = latestUpdateDownloaded.releaseName;
|
const latestVersionDownloaded = latestUpdateDownloaded?.releaseName;
|
||||||
console.info(
|
console.info(
|
||||||
`Latest version from release download: ${currentRelease} (current: ${app.getVersion()}, most recent downloaded ${latestVersionDownloaded}})`,
|
`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
|
// cache the latest update which has been downloaded as electron offers no api to read it
|
||||||
let latestUpdateDownloaded: ICachedUpdate;
|
let latestUpdateDownloaded: ICachedUpdate | undefined;
|
||||||
autoUpdater
|
autoUpdater
|
||||||
.on("update-available", function () {
|
.on("update-available", function () {
|
||||||
ipcChannelSendUpdateStatus(true);
|
ipcChannelSendUpdateStatus(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user