Skip to content

Commit 8cd24a5

Browse files
ZeroX-DGRokt33r
authored andcommitted
fixed open empty link 2
1 parent ba913b7 commit 8cd24a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/components/MarkdownPreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ export default class MarkdownPreview extends React.Component {
255255
return
256256
}
257257
// No contextMenu was passed to us -> execute our own link-opener
258-
if (event.target.tagName.toLowerCase() === 'a') {
258+
if (event.target.tagName.toLowerCase() === 'a' && event.target.getAttribute('href')) {
259259
const href = event.target.href
260260
const isLocalFile = href.startsWith('file:')
261261
if (isLocalFile) {

0 commit comments

Comments
 (0)