From a27bdbc69b99511d9142f93a653b5dc6be821a74 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 19 Feb 2023 10:42:56 +0800 Subject: [PATCH] Another guard for corrupted shortcuts --- src/components/shortcuts-settings.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/shortcuts-settings.jsx b/src/components/shortcuts-settings.jsx index d401334b..84cb01dc 100644 --- a/src/components/shortcuts-settings.jsx +++ b/src/components/shortcuts-settings.jsx @@ -210,6 +210,7 @@ function ShortcutsSettings() { {shortcuts.map((shortcut, i) => { const key = i + Object.values(shortcut); const { type } = shortcut; + if (!SHORTCUTS_META[type]) return null; let { icon, title } = SHORTCUTS_META[type]; if (typeof title === 'function') { title = title(shortcut);