From 36d9a091fd2ffa6b3433335525f0303c2d5ceaba Mon Sep 17 00:00:00 2001 From: Oj Date: Fri, 28 Jan 2022 21:02:49 +0000 Subject: [PATCH] [Updater > App] Fix error for updater v2 --- src/updater/appUpdater.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/updater/appUpdater.js b/src/updater/appUpdater.js index ffdf99f..d82e5ec 100644 --- a/src/updater/appUpdater.js +++ b/src/updater/appUpdater.js @@ -13,16 +13,16 @@ const { initSplash, focusWindow, APP_SHOULD_LAUNCH, APP_SHOULD_SHOW, events: spl exports.update = (startMin, done, show) => { if (updater.tryInitUpdater(buildInfo, NEW_UPDATE_ENDPOINT)) { - const updater = updater.getUpdater(); + const inst = updater.getUpdater(); - updater.on('host-updated', () => { + inst.on('host-updated', () => { autostartUpdate(() => {}); }); - updater.on('unhandled-exception', fatal); - updater.on(updater.INCONSISTENT_INSTALLER_STATE_ERROR, fatal); - updater.on('update-error', handled); + inst.on('unhandled-exception', fatal); + inst.on(updater.INCONSISTENT_INSTALLER_STATE_ERROR, fatal); + inst.on('update-error', handled); - performFirstRunTasks(updater); + performFirstRunTasks(inst); } else { moduleInit(UPDATE_ENDPOINT, settings, buildInfo); }