diff --git a/web/app/components/base/markdown.tsx b/web/app/components/base/markdown.tsx
index bc6fe0e43a..4600543ac4 100644
--- a/web/app/components/base/markdown.tsx
+++ b/web/app/components/base/markdown.tsx
@@ -216,16 +216,24 @@ CodeBlock.displayName = 'CodeBlock'
const VideoBlock: any = memo(({ node }: any) => {
const srcs = node.children.filter((child: any) => 'properties' in child).map((child: any) => (child as any).properties.src)
- if (srcs.length === 0)
+ if (srcs.length === 0) {
+ const src = node.properties?.src
+ if (src)
+ return
return null
+ }
return
})
VideoBlock.displayName = 'VideoBlock'
const AudioBlock: any = memo(({ node }: any) => {
const srcs = node.children.filter((child: any) => 'properties' in child).map((child: any) => (child as any).properties.src)
- if (srcs.length === 0)
+ if (srcs.length === 0) {
+ const src = node.properties?.src
+ if (src)
+ return
return null
+ }
return
})
AudioBlock.displayName = 'AudioBlock'