Skip to content

Commit b0363c0

Browse files
golota60jquense
andauthored
fix(Dropdown): add checking if ref exists on dropdown (#958)
* fix: add checking if ref exists on dropdown * Update src/Dropdown.tsx Co-authored-by: Jason Quense <[email protected]> * linting Co-authored-by: Jason Quense <[email protected]>
1 parent 849ab56 commit b0363c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Dropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function Dropdown({
278278
(e) => {
279279
if (
280280
(e.key === 'Tab' && !e.target) ||
281-
!menuRef.current!.contains(e.target as HTMLElement)
281+
!menuRef.current?.contains(e.target as HTMLElement)
282282
) {
283283
onToggle(false, event);
284284
}

0 commit comments

Comments
 (0)