'ref' might be undefined

This commit is contained in:
0x1eef 2024-10-13 12:15:49 -03:00
parent ebd4bb36ca
commit 36a472a506

View file

@ -41,7 +41,7 @@ function Select({ value, children: options, className }: Props) {
e.stopPropagation();
const { ref } = n.props;
setOpen(!isOpen);
ref.current?.click();
ref?.current?.click();
}}
>
{n}