From 5862248153e184434c7fcf18e091827d5c7e24a1 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 16 Jan 2025 16:17:24 +0100 Subject: [PATCH] fix error --- src/features/command/context.tsx | 4 ++++ src/features/file/grid.tsx | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/features/command/context.tsx b/src/features/command/context.tsx index 6c39a3b..794c73c 100644 --- a/src/features/command/context.tsx +++ b/src/features/command/context.tsx @@ -75,6 +75,10 @@ const Root: ParentComponent<{ commands: CommandType[] }> = (props) => { }); const listener = (e: KeyboardEvent) => { + if (!e.key) { + return; + } + const key = e.key.toLowerCase(); const modifiers = (e.shiftKey ? 1 : 0) << 0 | diff --git a/src/features/file/grid.tsx b/src/features/file/grid.tsx index 1deed61..d906a9c 100644 --- a/src/features/file/grid.tsx +++ b/src/features/file/grid.tsx @@ -47,7 +47,7 @@ export function Grid(props: { class?: string, rows: Entry[], locales: string[], renderer: ({ row, column, value, mutate }) => { const entry = rows().value[row]!; - return