Skip to content

Commit

Permalink
Fix #1904
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-m1 committed Dec 30, 2020
1 parent 8b1d76d commit 82711e1
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 82711e1

Please sign in to comment.