Skip to content

Commit 1521cb8

Browse files
committed
Tweak check to be a boolean
1 parent 41b213f commit 1521cb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/use-dropdown-menu.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export default function useDropdownMenu(itemCount: number) {
5656
}
5757

5858
// Ignore if we're clicking inside the menu
59-
if (event.target.closest('[role="menu"]')) {
59+
if (event.target.closest('[role="menu"]') instanceof Element) {
6060
return;
6161
}
6262

0 commit comments

Comments
 (0)