From 72842faf85b96c2860af06728758956d4ca82f5b Mon Sep 17 00:00:00 2001 From: Oj Date: Fri, 22 Apr 2022 17:08:04 +0100 Subject: [PATCH] [Bootstrap] Minor source cleanup --- src/bootstrap.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/bootstrap.js b/src/bootstrap.js index 0e9a5fb..9882d24 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -142,14 +142,8 @@ module.exports = () => { desktopCore?.handleOpenUrl?.(a.includes('--url') && a[a.indexOf('--') + 1]); // Change url of main window if protocol is used (uses like "discord --url -- discord://example") }); - if (!app.requestSingleInstanceLock() && !(process.argv.includes('--multi-instance') || oaConfig.multiInstance === true)) { - log('Bootstrap', 'Non-first instance'); - return app.quit(); - } + if (!app.requestSingleInstanceLock() && !(process.argv.includes('--multi-instance') || oaConfig.multiInstance === true)) return app.quit(); - if (app.isReady()) { - startUpdate(); - } else { - app.once('ready', startUpdate); - } + if (app.isReady()) startUpdate(); + else app.once('ready', startUpdate); };