fix: catch close error

This commit is contained in:
ThaUnknown 2024-08-14 01:48:32 +02:00 committed by NoCrypt
parent 994dabfa82
commit e2e06c4ed7

View file

@ -33,8 +33,10 @@ export default class Updater {
install (forceRunAfter = false) {
if (this.hasUpdate) {
setImmediate(() => {
this.window.close()
this.torrentWindow.close()
try {
this.window.close()
this.torrentWindow.close()
} catch (e) {}
autoUpdater.quitAndInstall(true, forceRunAfter)
})
if (process.platform === 'darwin') shell.openExternal('https://github.com/NoCrypt/migu/releases/latest')