diff --git a/packages/karbon/package.json b/packages/karbon/package.json index f91034c5..5802f85a 100644 --- a/packages/karbon/package.json +++ b/packages/karbon/package.json @@ -231,4 +231,4 @@ "access": "public" }, "gitHead": "8df1f4d5837a7e2ddbff6cc79f5fec256c34a394" -} \ No newline at end of file +} diff --git a/packages/karbon/src/runtime/composables/front-page.ts b/packages/karbon/src/runtime/composables/front-page.ts index 584a9f52..26926931 100644 --- a/packages/karbon/src/runtime/composables/front-page.ts +++ b/packages/karbon/src/runtime/composables/front-page.ts @@ -183,7 +183,7 @@ export function useArticleLoader({ for (const id of [...articles.value.map(({ id }) => id), ...exclude]) { alreadyUsed.add(id) } - const source = (await getAllArticles()).data.value ?? [] + const source = (await getAllArticles()) ?? [] while (source.length) { const { result: nextChunk, skip } = getFillArticlesWithSkip( { conditions, count: chunk || 1, used: alreadyUsed, sourceCursor }, diff --git a/packages/karbon/src/runtime/composables/pagination.ts b/packages/karbon/src/runtime/composables/pagination.ts index b02d4103..b5dee4a0 100644 --- a/packages/karbon/src/runtime/composables/pagination.ts +++ b/packages/karbon/src/runtime/composables/pagination.ts @@ -97,7 +97,7 @@ export function useArticlePagination({ }: UseArticlePaginationInput): UseArticlePaginationReturn { const { conditions } = normalizeCondition(conditionInput) const allArticles = useStaticAsyncState(`pagination-article-${hash(conditions)}`, async () => { - const _allArticles = (await getAllArticles()).data.value ?? [] + const _allArticles = (await getAllArticles()) ?? [] return _allArticles.filter((article) => evaluateCondition(article, conditions)) })