various fixes
This commit is contained in:
@@ -163,8 +163,8 @@ class InfiniteScroller{
|
||||
this.currrunning=true;
|
||||
}
|
||||
if(!this.div){this.currrunning=false;return}
|
||||
const out=await Promise.allSettled([this.watchForTop(),this.watchForBottom()])
|
||||
const changed=(out[0]||out[1]);
|
||||
const out=await Promise.allSettled([this.watchForTop(),this.watchForBottom()]) as {value:boolean}[];
|
||||
const changed=(out[0].value||out[1].value);
|
||||
if(null===this.timeout&&changed){
|
||||
this.timeout=setTimeout(this.updatestuff.bind(this),300);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ class InfiniteScroller{
|
||||
await this.destroyFromID(thing[1]);
|
||||
}
|
||||
this.HTMLElements=[];
|
||||
clearInterval(this.timeout);
|
||||
clearTimeout(this.timeout);
|
||||
if(this.div){
|
||||
this.div.remove();
|
||||
}
|
||||
|
Reference in New Issue
Block a user