1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-12 17:26:17 +00:00

fix unclickable links

This commit is contained in:
Baptiste Augrain
2020-06-14 02:22:37 +02:00
committed by Junyoung Choi
parent e504f8e63e
commit 60fbb7db5d

View File

@@ -1192,7 +1192,10 @@ class MarkdownPreview extends React.Component {
e.preventDefault()
e.stopPropagation()
const rawHref = e.target.getAttribute('href')
const el = e.target.closest('a[href]')
if (!el) return
const rawHref = el.getAttribute('href')
const { dispatch } = this.props
if (!rawHref) return // not checked href because parser will create file://... string for [empty link]()