Skip to content

Commit

Permalink
fixed open empty link 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroX-DG authored and Rokt33r committed May 6, 2019
1 parent ba913b7 commit 8cd24a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion browser/components/MarkdownPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ export default class MarkdownPreview extends React.Component {
return
}
// No contextMenu was passed to us -> execute our own link-opener
if (event.target.tagName.toLowerCase() === 'a') {
if (event.target.tagName.toLowerCase() === 'a' && event.target.getAttribute('href')) {
const href = event.target.href
const isLocalFile = href.startsWith('file:')
if (isLocalFile) {
Expand Down

0 comments on commit 8cd24a5

Please sign in to comment.