From b0a52d7c8fa3506a007fea76367eddf4c5d52ebc Mon Sep 17 00:00:00 2001 From: MathMan05 Date: Sat, 17 Aug 2024 13:34:38 -0500 Subject: [PATCH] add missing check --- .dist/infiniteScroller.js | 2 +- webpage/infiniteScroller.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.dist/infiniteScroller.js b/.dist/infiniteScroller.js index 32e12f6..c289bd2 100644 --- a/.dist/infiniteScroller.js +++ b/.dist/infiniteScroller.js @@ -60,7 +60,7 @@ class InfiniteScroller { snapBottom() { const scrollBottom = this.scrollBottom; return () => { - if (scrollBottom < 30) { + if (this.scroll && scrollBottom < 30) { this.scroll.scrollTop = this.scroll.scrollHeight; } }; diff --git a/webpage/infiniteScroller.ts b/webpage/infiniteScroller.ts index 89368be..1c72cab 100644 --- a/webpage/infiniteScroller.ts +++ b/webpage/infiniteScroller.ts @@ -62,7 +62,7 @@ class InfiniteScroller{ snapBottom(){ const scrollBottom=this.scrollBottom; return ()=>{ - if(scrollBottom<30){ + if(this.scroll&&scrollBottom<30){ this.scroll.scrollTop=this.scroll.scrollHeight; } }