Skip to content

Commit

Permalink
asdf
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Jan 30, 2025
1 parent a90faa6 commit 0f21245
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/internal/utils/getHorizontalPosition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ export function getHorizontalPosition({
contentRect,
triggerRect,
}: getHorizontalPositionReact): number {
// Return a default position (0) if rects are not defined.
if (!triggerRect || !contentRect) {
// Return a default position (0) if properties are not defined
if (
!triggerRect?.left ||
!triggerRect?.right ||
!triggerRect?.width ||
!contentRect?.width
) {
return 0;
}

Expand Down

0 comments on commit 0f21245

Please sign in to comment.