From 2214be211f0c45f04173cada67033c0322ed41b6 Mon Sep 17 00:00:00 2001 From: Oj Date: Thu, 24 Mar 2022 14:09:59 +0000 Subject: [PATCH] [Splash > Backend] Minor source cleanup --- src/splash/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/splash/index.js b/src/splash/index.js index a757c5e..d2ca0cc 100644 --- a/src/splash/index.js +++ b/src/splash/index.js @@ -101,14 +101,12 @@ const launchSplashWindow = (startMinimized) => { if (process.platform !== 'darwin') win.on('closed', () => { if (!launchedMainWindow) app.quit(); }); wc.once('dom-ready', () => { - if (oaConfig.themeSync !== false) try { // Inject themesync CSS - wc.insertCSS(JSON.parse(fs.readFileSync(join(paths.getUserData(), 'userDataCache.json'), 'utf8')).openasarSplashCSS); - } catch (e) { } + if (oaConfig.themeSync !== false) wc.insertCSS(JSON.parse(fs.readFileSync(join(paths.getUserData(), 'userDataCache.json'), 'utf8')).openasarSplashCSS); - if (oaConfig.splashText === true) try { + if (oaConfig.splashText === true) { const buildInfo = require('../utils/buildInfo.js'); wc.executeJavaScript(`debug.textContent = '${buildInfo.releaseChannel} ${buildInfo.version}\\nOpenAsar ${oaVersion}'`); - } catch (e) { } + } }); if (!startMinimized) win.once('ready-to-show', () => win.show());