various fixes

This commit is contained in:
MathMan05 2024-08-18 11:11:36 -05:00
parent 302341bb99
commit fa1db8cf5d
6 changed files with 65 additions and 6 deletions

View file

@ -164,7 +164,7 @@ class InfiniteScroller {
return;
}
const out = await Promise.allSettled([this.watchForTop(), this.watchForBottom()]);
const changed = (out[0] || out[1]);
const changed = (out[0].value || out[1].value);
if (null === this.timeout && changed) {
this.timeout = setTimeout(this.updatestuff.bind(this), 300);
}
@ -217,7 +217,7 @@ class InfiniteScroller {
await this.destroyFromID(thing[1]);
}
this.HTMLElements = [];
clearInterval(this.timeout);
clearTimeout(this.timeout);
if (this.div) {
this.div.remove();
}