From f339c8c78a7c3e03e82ac4a3f335261ab990f995 Mon Sep 17 00:00:00 2001 From: Adler Luiz Date: Sat, 22 Aug 2020 11:59:37 -0300 Subject: [PATCH] :bug: Fix #327 to prevent error on start --- main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 8fce0efdb..ec8d3e03f 100644 --- a/main.js +++ b/main.js @@ -1827,7 +1827,14 @@ function loadCustomPageScript() { function registerGlobalShortcut(value, fn) { if (value != 'disabled') { - globalShortcut.register(`${value}`, fn) + try { + globalShortcut.register(`${value}`, fn) + } catch { + writeLog({ + type: 'warn', + data: `Failed to register global shortcut ${value}`, + }) + } } }