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'