From 02a7a3b2c315cf90596f38d8bb3182ea8aaa7b84 Mon Sep 17 00:00:00 2001 From: purocean Date: Sun, 9 May 2021 13:33:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E5=BF=AB=E6=8D=B7=E9=94=AE?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/useful/shortcut.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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