Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 committed Dec 30, 2020
1 parent 0085b85 commit 8bbb51f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoS
height,
width;

if (el !== window && el !== getWindowScrollingElement()) {
if (el !== window && el.parentNode && el !== getWindowScrollingElement()) {
elRect = el.getBoundingClientRect();
top = elRect.top;
left = elRect.left;
Expand Down

0 comments on commit 8bbb51f

Please sign in to comment.