From c64240e509aaafba988765e10eef5953ae5b9d8a Mon Sep 17 00:00:00 2001 From: jhynsoo Date: Thu, 23 May 2024 17:21:24 +0900 Subject: [PATCH] Fix: fix article list observer --- src/components/article/ArticleList.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/article/ArticleList.vue b/src/components/article/ArticleList.vue index 6f3fd85..c3356b2 100644 --- a/src/components/article/ArticleList.vue +++ b/src/components/article/ArticleList.vue @@ -22,8 +22,7 @@ watch(lastElement, (el) => { } const observer = new IntersectionObserver( ([entry]) => { - if (entry.isIntersecting && hasNextPage.value) { - // params.pageNo += 1; + if (entry.isIntersecting && articles.value.length && hasNextPage.value) { currentPage.value += 1; searchList(); }