Skip to content

Commit 9f523b9

Browse files
committed
chore(lints): fix type errors
1 parent 615d38c commit 9f523b9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/composables/useLayoutContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export function useLayoutContent() {
1717
queryCollection('layout')
1818
.path(`/layout/${locale.value}`)
1919
.first()
20-
.then(({ body }) => body),
20+
.then(data => data?.body || {}),
2121
{ watch: [locale] }
2222
);
2323

src/composables/usePageContent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export function usePageContent() {
3030
const { components, i18nParams, ...meta } = await queryCollection('page')
3131
.path(path)
3232
.first()
33-
.then(({ body }) => body as PageContent);
33+
.then(data => (data?.body || {}) as PageContent);
3434

3535
if (!import.meta.server) {
3636
setI18nParams(i18nParams);

0 commit comments

Comments
 (0)