mirror of
https://github.com/langgenius/dify.git
synced 2025-12-25 00:52:15 +00:00
fix: not permitted schema of markdown link cause page crash (#21258)
This commit is contained in:
parent
6b1ad634f1
commit
40e8ad419b
@ -16,7 +16,7 @@ const Link = ({ node, children, ...props }: any) => {
|
||||
}
|
||||
else {
|
||||
const href = props.href || node.properties?.href
|
||||
if(!isValidUrl(href))
|
||||
if(!href || !isValidUrl(href))
|
||||
return <span>{children}</span>
|
||||
|
||||
return <a href={href} target="_blank" className="cursor-pointer underline !decoration-primary-700 decoration-dashed">{children || 'Download'}</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user