浏览代码

fix: not permitted schema of markdown link cause page crash (#21258)

tags/1.5.0
非法操作 4 个月前
父节点
当前提交
40e8ad419b
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      web/app/components/base/markdown-blocks/link.tsx

+ 1
- 1
web/app/components/base/markdown-blocks/link.tsx 查看文件

@@ -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>

正在加载...
取消
保存