Merge pull request #2624 from SergioCrisostomo/check-for-element-before
check for element before using it
This commit is contained in:
commit
52830ca693
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue