fix asset.find for win32

This commit is contained in:
MrGarlic1 2024-05-09 17:10:24 +01:00 committed by GitHub
parent 1abb25c204
commit 0299313818
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,8 +29,7 @@ handle(IpcEvents.UPDATER_DOWNLOAD, () => {
switch (process.platform) {
case "win32":
return assets.find(a => {
if (PORTABLE && a.name.endsWith("win.zip")) return true;
if (!PORTABLE && a.name.endsWith(".exe")) return true;
return PORTABLE ? a.name.endsWith("win.zip") : a.name.endsWith(".exe");
})!.browser_download_url;
case "darwin":
return assets.find(a =>