From ff91ce64485c3d9afd6aa37e4c830e4fead02837 Mon Sep 17 00:00:00 2001 From: hirotomoyamada Date: Sat, 25 Oct 2025 10:09:47 +0900 Subject: [PATCH] fix(index.tsx): ensure hotkey array is not empty before checking --- src/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.tsx b/src/index.tsx index f64a469c..ef5ea9c2 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -738,7 +738,7 @@ const Toaster = React.forwardRef(function Toaster(pro React.useEffect(() => { const handleKeyDown = (event: KeyboardEvent) => { - const isHotkeyPressed = hotkey.every((key) => (event as any)[key] || event.code === key); + const isHotkeyPressed = hotkey.length > 0 && hotkey.every((key) => (event as any)[key] || event.code === key); if (isHotkeyPressed) { setExpanded(true);