From 84b6fac13f86ffbd656abfc78987d4527ce2d06e Mon Sep 17 00:00:00 2001 From: Oj Date: Tue, 15 Mar 2022 20:16:09 +0000 Subject: [PATCH] [Splash > Backend] Minor source cleanup --- src/splash/index.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/splash/index.js b/src/splash/index.js index d6b9020..0d6db82 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -257,10 +257,8 @@ const initModuleUpdater = () => { // "Old" (not v2 / new, win32 only) add('downloading-modules-finished', ({ failed }) => { progressState = 'installing'; - if (failed > 0) { - handleFail(); - } else if (restartRequired) moduleUpdater.quitAndInstallUpdates(); - // process.nextTick(() => moduleUpdater[restartRequired ? 'quitAndInstallUpdates' : 'installPendingUpdates']()); + if (failed > 0) handleFail(); + else if (restartRequired) moduleUpdater.quitAndInstallUpdates(); }); add('installing-module', ({ name }) => { @@ -278,11 +276,11 @@ const initModuleUpdater = () => { // "Old" (not v2 / new, win32 only) add('installing-modules-finished', callbackCheck); add('no-pending-updates', callbackCheck); - // add('downloading-module-progress', progressCallback(downloads)); + add('downloading-module-progress', ({ name, recv, total }) => { downloads.record(name, '', recv, total); }); - // add('installing-module-progress', progressCallback(installs)); + add('installing-module-progress', ({ name, entries, total }) => { installs.record(name, '', entries, total); });