From 2e737331f9172f3897d5e48c7efe6dc6853fdd08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Fri, 6 Mar 2026 12:04:18 +0100 Subject: [PATCH] nicolium: fix hotkeys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- packages/nicolium/src/features/ui/components/hotkeys.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nicolium/src/features/ui/components/hotkeys.tsx b/packages/nicolium/src/features/ui/components/hotkeys.tsx index ec70798cd..d1029ef1a 100644 --- a/packages/nicolium/src/features/ui/components/hotkeys.tsx +++ b/packages/nicolium/src/features/ui/components/hotkeys.tsx @@ -216,9 +216,9 @@ function useHotkeys(handlers: HandlerMap) { }); // Sort all matches by priority - matchCandidates.toSorted((a, b) => b.priority - a.priority); + const sortedCandidates = matchCandidates.toSorted((a, b) => b.priority - a.priority); - const bestMatchingHandler = matchCandidates.at(0)?.handler; + const bestMatchingHandler = sortedCandidates.at(0)?.handler; if (bestMatchingHandler) { const result = bestMatchingHandler(event); if (result !== false) {