pl-fe: fix

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-06-28 16:56:54 +02:00
parent 1931b68b1f
commit bc4cc8c840

View File

@ -310,7 +310,7 @@ const DropdownMenu = (props: IDropdownMenu) => {
}, []);
useEffect(() => {
(refs.reference.current as HTMLButtonElement).setAttribute('aria-expanded', String(isOpen));
(refs.reference.current as HTMLButtonElement)?.setAttribute('aria-expanded', String(isOpen));
setTimeout(() => setIsDisplayed(isOpen), isOpen ? 0 : 150);
}, [isOpen]);