1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

fixed open empty link 2

This commit is contained in:
Nguyễn Việt Hưng
2019-05-02 11:58:18 +12:00
committed by Junyoung Choi
parent ba913b77e7
commit 8cd24a5734

View File

@@ -255,7 +255,7 @@ export default class MarkdownPreview extends React.Component {
return return
} }
// No contextMenu was passed to us -> execute our own link-opener // 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 href = event.target.href
const isLocalFile = href.startsWith('file:') const isLocalFile = href.startsWith('file:')
if (isLocalFile) { if (isLocalFile) {