From b18c14117d5f54d126ae9e10dbac439e06f7585c Mon Sep 17 00:00:00 2001 From: Aidan Timson Date: Mon, 29 Sep 2025 10:05:40 +0100 Subject: [PATCH] foreach --- src/common/keyboard/shortcuts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/keyboard/shortcuts.ts b/src/common/keyboard/shortcuts.ts index 8f9f4e611f..40d87cf2ed 100644 --- a/src/common/keyboard/shortcuts.ts +++ b/src/common/keyboard/shortcuts.ts @@ -38,7 +38,7 @@ function registerShortcuts( ): () => void { const wrappedShortcuts: Record = {}; - for (const [key, handler] of Object.entries(shortcuts)) { + Object.entries(shortcuts).forEach(([key, handler]) => { wrappedShortcuts[key] = (event: KeyboardEvent) => { if (!canOverrideAlphanumericInput(event.composedPath())) { return; @@ -48,7 +48,7 @@ function registerShortcuts( } handler(event); }; - } + }); // Underlying implementation (tinykeys for now) return tinykeys(window, wrappedShortcuts);