patch: autoupdate stagingPercentage check, include default

Change-Type: patch
This commit is contained in:
Peter Makra 2022-02-21 21:09:49 +01:00
parent 6774bf784c
commit c1f7164273

View File

@ -43,7 +43,7 @@ async function checkForUpdates(interval: number) {
const release = await autoUpdater.checkForUpdates();
const isOutdated =
semver.compare(release.updateInfo.version, version) > 0;
const shouldUpdate = release.updateInfo.stagingPercentage || 0 > 0;
const shouldUpdate = release.updateInfo.stagingPercentage !== 0; // undefinded means 100%
if (shouldUpdate && isOutdated) {
await autoUpdater.downloadUpdate();
packageUpdated = true;