From 3f5845cf8df3f84479c417c133efd0b519c9bb28 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Wed, 6 Jun 2018 00:35:58 +0800 Subject: [PATCH] fix(settings): prevent shortcut error when it's not set --- src/components/SettingsBar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/SettingsBar.js b/src/components/SettingsBar.js index ceb29d1..3d5127c 100644 --- a/src/components/SettingsBar.js +++ b/src/components/SettingsBar.js @@ -23,6 +23,7 @@ function detectOS() { } function friendlyFormatShortcut(shortcut) { + if (!shortcut) return const OS = detectOS() if (OS === OperatingSystems.Windows) { return shortcut.replace(/meta/, 'win')