Check err.toString instead of err.message (#1171)

This commit is contained in:
Evan Simkowitz 2024-10-30 14:24:37 -07:00 committed by GitHub
parent b3fdbbc331
commit 77fbd324c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,7 +66,7 @@ export class Updater {
autoUpdater.on("error", (err) => { autoUpdater.on("error", (err) => {
console.log("updater error"); console.log("updater error");
console.log(err); console.log(err);
if (!err.message.includes("net::ERR_INTERNET_DISCONNECTED")) this.status = "error"; if (!err.toString()?.includes("net::ERR_INTERNET_DISCONNECTED")) this.status = "error";
}); });
autoUpdater.on("checking-for-update", () => { autoUpdater.on("checking-for-update", () => {