修正快捷键判断问题

This commit is contained in:
purocean
2021-05-09 13:34:07 +08:00
parent fc31fd4564
commit 02a7a3b2c3
+1 -1
View File
@@ -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