diff --git a/frontend/src/useful/shortcut.ts b/frontend/src/useful/shortcut.ts index 1a5f531e..6c8ae292 100644 --- a/frontend/src/useful/shortcut.ts +++ b/frontend/src/useful/shortcut.ts @@ -76,7 +76,7 @@ export function isAction (e: KeyboardEvent | MouseEvent, name: ActionName): bool export function isAction (e: KeyboardEvent | MouseEvent, name: string): boolean export function isAction (e: KeyboardEvent | MouseEvent, name: string) { logger.debug('isAction', name, e) - return matchKeys(e, actions[name]) + return !!actions[name] && matchKeys(e, actions[name]) } export function getActionLabel (name: ActionName): string