Skip to content

Commit

Permalink
Fix Crash from undefined Tooltip wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
parasharrajat committed May 19, 2023
1 parent 8a3d79c commit 0397b5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/styles/getTooltipStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function isOverlappingAtTop(xOffset, yOffset, tooltip) {
const element = document.elementFromPoint(xOffset, yOffset);

// Ensure it's not the already rendered element of this very tooltip, so the tooltip doesn't try to "avoid" itself
if (!element || tooltip.contains(element)) {
if (!element || (tooltip && tooltip.contains(element))) {
return false;
}

Expand Down

0 comments on commit 0397b5a

Please sign in to comment.