diff --git a/src/FillSpace.jsx b/src/FillSpace.jsx index 6cb74fb..ca0d4de 100644 --- a/src/FillSpace.jsx +++ b/src/FillSpace.jsx @@ -311,7 +311,7 @@ class FillSpace extends Component { containerTarget, ]; for (const el of targets) { - if (el && el.offsetParent !== null) { + if (el && typeof Element !== 'undefined' && el instanceof Element && el.offsetParent !== null) { this.observer.observe(el); } }