Skip to content

Commit

Permalink
fix: handle events even if there are no anchors
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Feb 22, 2023
1 parent e1264e6 commit eb9e08c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,6 @@ const Tooltip = ({
elementRefs.add({ current: anchorById })
}

if (!elementRefs.size) {
return () => null
}

if (closeOnEsc) {
window.addEventListener('keydown', handleEsc)
}
Expand Down

0 comments on commit eb9e08c

Please sign in to comment.