Skip to content

Commit ac3e11a

Browse files
Update src/use-dropdown-menu.ts
Co-authored-by: Wes Cossick <[email protected]>
1 parent 16a18fe commit ac3e11a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/use-dropdown-menu.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export default function useDropdownMenu<ButtonElement extends HTMLElement = HTML
7979
}
8080

8181
// Initialize object to track if the removal happens before the addition of the event listener
82+
// -> We're using an object here so that arrow functions below capture the reference and not the value
8283
const removalTracker = {
8384
removed: false,
8485
};

0 commit comments

Comments
 (0)