From 9ed1b0b01ba6aed930e5fa630216510d3ee53b4b Mon Sep 17 00:00:00 2001 From: Oj Date: Wed, 27 Apr 2022 09:55:26 +0100 Subject: [PATCH] [Updater > Module] Minor source cleanup --- src/updater/moduleUpdater.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/updater/moduleUpdater.js b/src/updater/moduleUpdater.js index 43b590f..a8176db 100644 --- a/src/updater/moduleUpdater.js +++ b/src/updater/moduleUpdater.js @@ -162,8 +162,6 @@ const downloadModule = async (name, ver) => { await new Promise((res) => file.on('close', res)); - if (!installed[name]) installed[name] = {}; - if (success) commitManifest(); else downloading.fail++; @@ -227,7 +225,7 @@ const installModule = async (name, ver, path) => { proc.on('close', () => { if (err) return; - installed[name].installedVersion = ver; + installed[name] = { installedVersion: ver }; commitManifest(); finishInstall(name, ver, true);