Skip to content

Commit c04ea75

Browse files
committed
fix(pat bumper): Fallback to null if no scroll container can be found. Fixes a problem with initalization of the IntersectionObserver introduced in 7.2.0.
1 parent ac220fd commit c04ea75

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/pat/bumper/bumper.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,16 @@ export default Base.extend({
4343
},
4444

4545
_init() {
46-
const scroll_container_y = dom.find_scroll_container(this.el.parentElement, "y");
47-
const scroll_container_x = dom.find_scroll_container(this.el.parentElement, "x");
46+
const scroll_container_y = dom.find_scroll_container(
47+
this.el.parentElement,
48+
"y",
49+
null
50+
);
51+
const scroll_container_x = dom.find_scroll_container(
52+
this.el.parentElement,
53+
"x",
54+
null
55+
);
4856

4957
const pos = {
5058
top: dom.get_css_value(this.el, "top", true),

0 commit comments

Comments
 (0)