fix(settings): prevent shortcut error when it's not set

This commit is contained in:
EnixCoda 2018-06-06 00:35:58 +08:00
parent 9511e8bf29
commit 3f5845cf8d

View file

@ -23,6 +23,7 @@ function detectOS() {
}
function friendlyFormatShortcut(shortcut) {
if (!shortcut) return
const OS = detectOS()
if (OS === OperatingSystems.Windows) {
return shortcut.replace(/meta/, 'win')