Skip to content

Commit

Permalink
fix unclickable links
Browse files Browse the repository at this point in the history
  • Loading branch information
daiyam authored and Rokt33r committed Jul 20, 2020
1 parent e504f8e commit 60fbb7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion browser/components/MarkdownPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]()

Expand Down

0 comments on commit 60fbb7d

Please sign in to comment.