We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9846e7e commit bc63846Copy full SHA for bc63846
1 file changed
app/(docs)/@chat/chat/[chatId]/page.tsx
@@ -35,7 +35,10 @@ export default async function ChatPage({
35
const targetPage = targetLang?.pages.find(
36
(page) => page.slug === chatData.section.pagePath.split("/")[1]
37
);
38
- const sections = await getMarkdownSections(targetLang!.id, targetPage!.slug);
+ const sections =
39
+ targetLang && targetPage
40
+ ? await getMarkdownSections(targetLang.id, targetPage.slug)
41
+ : [];
42
const targetSection = sections.find((sec) => sec.id === chatData.sectionId);
43
44
return (
0 commit comments