diff --git a/app/mainAppWindow/index.js b/app/mainAppWindow/index.js index 207729a8..6da1ccc5 100644 --- a/app/mainAppWindow/index.js +++ b/app/mainAppWindow/index.js @@ -338,16 +338,18 @@ function secureOpenLink(details) { function openInBrowser(details) { if (config.defaultURLHandler.trim() !== '') { - exec(`${config.defaultURLHandler.trim()} ${details.url}`, (error) => { - if (error) { - logger.error(error.message); - } - }); + exec(`${config.defaultURLHandler.trim()} ${details.url}`, openInBrowserErrorHandler); } else { shell.openExternal(details.url); } } +function openInBrowserErrorHandler(error) { + if (error) { + logger.error(error.message); + } +} + function getLinkAction() { const action = isControlPressed ? dialog.showMessageBoxSync(window, { type: 'warning',