From de850262b8633a00eefe99333658dbd08156e4bb Mon Sep 17 00:00:00 2001
From: crazywoola <100913391+crazywoola@users.noreply.github.com>
Date: Mon, 28 Oct 2024 19:23:31 +0800
Subject: [PATCH] fix: button rendering when using streaming (#9957)
---
web/app/components/base/markdown.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx
index 33ff23d3b..dde4bcf78 100644
--- a/web/app/components/base/markdown.tsx
+++ b/web/app/components/base/markdown.tsx
@@ -252,7 +252,7 @@ const MarkdownButton = ({ node }: any) => {
className={cn('!h-8 !px-3 select-none')}
onClick={() => onSend?.(message)}
>
- {node.children[0].value}
+ {node.children[0]?.value || ''}
}
MarkdownButton.displayName = 'MarkdownButton'