File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff 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 < >
Original file line number Diff line number Diff line change @@ -2,7 +2,8 @@ import type { InferPageType } from 'fumadocs-core/source'
22import type { PageData , source } from '@/lib/source'
33
44export 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
You can’t perform that action at this time.
0 commit comments