From f87b235abebd8eb33fb4a27f6ab9a269b82f0f27 Mon Sep 17 00:00:00 2001 From: dragongoose Date: Fri, 18 Aug 2023 13:31:11 -0400 Subject: [PATCH] Don't use anonymous function for this --- src/views/HomepageView.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/HomepageView.vue b/src/views/HomepageView.vue index d2b247a..0de85b0 100644 --- a/src/views/HomepageView.vue +++ b/src/views/HomepageView.vue @@ -48,8 +48,7 @@ export default { } } }, - getNextCategory() { - window.onscroll = async () => { + async getNextCategory() { let bottomOfWindow = document.documentElement.scrollTop + window.innerHeight === document.documentElement.offsetHeight @@ -62,11 +61,10 @@ export default { this.data.push(category) } } - } } }, async mounted() { - this.getNextCategory() + window.onscroll = this.getNextCategory let following = localStorage.getItem('following') if (following) {