summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/components/lists/listBody.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js
index 2e6591e2..112b6379 100644
--- a/client/components/lists/listBody.js
+++ b/client/components/lists/listBody.js
@@ -629,17 +629,21 @@ BlazeComponent.extendComponent({
threshold: 0.25,
};
- const observer = new IntersectionObserver((entries) => {
+ this.observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
this.spinnerShown = entry.isIntersecting;
this.updateList();
});
}, options);
- observer.observe(spinner);
+ this.observer.observe(spinner);
}
},
+ onDestroyed() {
+ this.observer.disconnect();
+ },
+
updateList() {
if (this.spinnerShown) {
this.cardlimit.set(this.cardlimit.get() + InfiniteScrollIter);