fix: catch close error

This commit is contained in:
ThaUnknown 2024-08-14 01:48:32 +02:00
parent 0a6f446e2d
commit d9236f9ffa

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://miru.watch/download')