Skip to content

Commit

Permalink
🐛 Fix ytmdesktop#327 to prevent error on start
Browse files Browse the repository at this point in the history
  • Loading branch information
adlerluiz committed Aug 22, 2020
1 parent 4643749 commit f339c8c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
})
}
}
}

Expand Down

0 comments on commit f339c8c

Please sign in to comment.