Skip to content

Commit 0a70d67

Browse files
committed
fix(core): set scrollparent to window if elm.parentNode is null
PeachScript#254
1 parent d8fd6c4 commit 0a70d67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/InfiniteLoading.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ export default {
320320
}
321321
322322
if (!result) {
323-
if (elm.tagName === 'BODY') {
323+
if (elm.tagName === 'BODY' || !elm.parentNode) {
324324
result = window;
325325
} else if (!this.forceUseInfiniteWrapper && ['scroll', 'auto'].indexOf(getComputedStyle(elm).overflowY) > -1) {
326326
result = elm;

0 commit comments

Comments
 (0)