Skip to content

Commit dc8a2e3

Browse files
committed
fix builg
1 parent 5734f2c commit dc8a2e3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,8 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
269269
)
270270
}
271271

272-
const MDX = (data as PageData).body
273-
const markdownContent = await (data as PageData).getText('processed')
272+
const MDX = data.body
273+
const markdownContent = await data.getText('processed')
274274

275275
return (
276276
<>

apps/docs/lib/llms.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import type { InferPageType } from 'fumadocs-core/source'
22
import type { PageData, source } from '@/lib/source'
33

44
export async function getLLMText(page: InferPageType<typeof source>) {
5-
const data = page.data as PageData
5+
const data = page.data as unknown as PageData
6+
if (typeof data.getText !== 'function') return ''
67
const processed = await data.getText('processed')
78
return `# ${data.title} (${page.url})
89

0 commit comments

Comments
 (0)