diff --git a/src/utils.js b/src/utils.js index 5dcc81e6fde8d68afe1569ef0dc3df398042e09a..09a3ce02eb205dc51325e5de48115356e6b177c7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -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;