From 4e4ccebacb387b1303d63718390dccf8be54cca4 Mon Sep 17 00:00:00 2001 From: hjkim0905 Date: Mon, 25 May 2026 00:14:19 +0900 Subject: [PATCH] fix(skills): guard empty options array in Dropdown example --- skills/frontend-a11y/SKILL.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/skills/frontend-a11y/SKILL.md b/skills/frontend-a11y/SKILL.md index 46adc8cc..3d6ce5e2 100644 --- a/skills/frontend-a11y/SKILL.md +++ b/skills/frontend-a11y/SKILL.md @@ -257,6 +257,8 @@ export function Dropdown({ options, onSelect }: { options: string[]; onSelect: ( const [activeIndex, setActiveIndex] = useState(0); const listId = useId(); + if (!options.length) return null; + const handleKeyDown = (e: React.KeyboardEvent) => { switch (e.key) { case 'ArrowDown':