Quellcode durchsuchen

fixed issue when observer.options is undefined

Former-commit-id: c3ebd2f9039d5e97d861720a69535cb582fa9c29
Gildas vor 6 Jahren
Ursprung
Commit
491fa7872a
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      lib/hooks/content/content-hooks-frames-web.js

+ 1 - 1
lib/hooks/content/content-hooks-frames-web.js

@@ -127,7 +127,7 @@
 		dispatchEvent(new UIEvent("scroll"));
 		const docBoundingRect = scrollingElement.getBoundingClientRect();
 		Array.from(observers, ([intersectionObserver, observer]) => {
-			const rootBoundingRect = observer.options.root && observer.options.root.getBoundingClientRect();
+			const rootBoundingRect = observer.options && observer.options.root && observer.options.root.getBoundingClientRect();
 			observer.callback(observedElements.get(intersectionObserver).map(target => {
 				const boundingClientRect = target.getBoundingClientRect();
 				const isIntersecting = true;