Skip to content

Commit

Permalink
fix(kcodeblock): fix shortcut manager runtime undefined (#2126)
Browse files Browse the repository at this point in the history
  • Loading branch information
portikM authored and adamdehaven committed Jun 15, 2024
1 parent 468ebc7 commit 73873ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utilities/ShortcutManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export class ShortcutManager<CommandKeyword extends string> {
}

function triggerShortcuts<CommandKeyword extends string>(event: KeyboardEvent, keyMap: Record<string, CommandKeyword>, commands: Record<CommandKeyword, Command>): void {
if (!event.code) {
return
}

const code = normalizeKeyCode(event.code)
const shortcut = [
event.ctrlKey ? 'ctrl' : '',
Expand Down

0 comments on commit 73873ff

Please sign in to comment.