From d9236f9ffabc90f9eda779ad7dd0820d12dbb34b Mon Sep 17 00:00:00 2001 From: ThaUnknown <6506529+ThaUnknown@users.noreply.github.com> Date: Wed, 14 Aug 2024 01:48:32 +0200 Subject: [PATCH] fix: catch close error --- electron/src/main/updater.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/electron/src/main/updater.js b/electron/src/main/updater.js index aa4ed7f..a619706 100644 --- a/electron/src/main/updater.js +++ b/electron/src/main/updater.js @@ -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')