[Splash] Fix setting module path twice for new updater quickstart

main
Oj 2 years ago
parent 479aa3b305
commit bb6454da31

@ -346,12 +346,6 @@ function initSplash(startMinimized = false) {
if (newUpdater != null) { // Manually load desktop_core module path for faster requiring
require('../utils/u2LoadModulePath')('discord_desktop_core');
const NodeModule = require('module');
const modulesDir = _path.default.join(paths.getExeDir(), 'modules');
const moduleCoreDir = _fs.default.readdirSync(modulesDir).find((x) => x.startsWith('discord_desktop_core-')); // Find desktop core dir by name
NodeModule.globalPaths.push(_path.default.join(modulesDir, moduleCoreDir)); // Add to globalPaths for requiring
}
/* if (newUpdater != null) {

Loading…
Cancel
Save