From 655b4384a22185d666b178d5086573bcdcac876d Mon Sep 17 00:00:00 2001 From: Ariel Lin Date: Tue, 26 Dec 2023 14:17:17 +0800 Subject: [PATCH] fix: article page loads more at the bottom when no more articles [SPMVP-6937] --- packages/karbon/src/runtime/components/InfiniteScroll.vue | 2 +- packages/karbon/src/runtime/composables/load-more.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/karbon/src/runtime/components/InfiniteScroll.vue b/packages/karbon/src/runtime/components/InfiniteScroll.vue index 61515b55..2ac5b134 100644 --- a/packages/karbon/src/runtime/components/InfiniteScroll.vue +++ b/packages/karbon/src/runtime/components/InfiniteScroll.vue @@ -58,7 +58,7 @@ if (process.client) { - Loading... + diff --git a/packages/karbon/src/runtime/composables/load-more.ts b/packages/karbon/src/runtime/composables/load-more.ts index 2584d644..e995db42 100644 --- a/packages/karbon/src/runtime/composables/load-more.ts +++ b/packages/karbon/src/runtime/composables/load-more.ts @@ -24,7 +24,7 @@ export function useLoadMore(GeneratorSource: () => AsyncGenerator, option? if (done) { preload ? loadMoreEvent.trigger([value]) : loadMoreEvent.trigger(value) - list.push(value) + value && list.push(value) loading.value = false isDone.value = true