diff --git a/src/components/scroll/scroll.vue b/src/components/scroll/scroll.vue index 47cc3828..10c8e699 100644 --- a/src/components/scroll/scroll.vue +++ b/src/components/scroll/scroll.vue @@ -228,8 +228,8 @@ }, onScroll() { - if (this.isLoading) return; const el = this.$refs.scrollContainer; + if (this.isLoading || !el) return; const scrollDirection = Math.sign(this.lastScroll - el.scrollTop); // IE has no Math.sign, check that webpack polyfills this const displacement = el.scrollHeight - el.clientHeight - el.scrollTop;