From 670e6ab7fdc66c8293a6e2b8ed4dc97e72266991 Mon Sep 17 00:00:00 2001 From: Colin Knebl Date: Sun, 27 Jan 2019 18:58:43 -0500 Subject: [PATCH] removed unnecessary thrown error In native implementations, root can be null when initializing. When root is null the root element is the viewport. --- src/_IntersectionObserver.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/_IntersectionObserver.js b/src/_IntersectionObserver.js index 6146fb6..38a0396 100644 --- a/src/_IntersectionObserver.js +++ b/src/_IntersectionObserver.js @@ -140,11 +140,6 @@ export default class IntersectionObserver { throw new TypeError("parameter 2 is not an object."); } - if ('root' in options && !(options.root instanceof Element)) { - throw new TypeError("member root is not of type Element."); - } - - const thresholds = parseThresholds(options.threshold); const rootMargin = parseMargins(options.rootMargin);