Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/smoothscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ function polyfill() {
function findScrollableParent(el) {
var isBody;

if (el === d.body) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we did var isBody = el === d.body would this work? Instead of early exiting the rest of the logic will continue working as expected I think.

return el;
}

do {
el = el.parentNode;

Expand Down