Skip to content

Commit ce74e69

Browse files
committed
check href exists
1 parent ddea2ae commit ce74e69

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

browser/components/MarkdownPreview.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function handleAnchorClick (e) {
5555
e.preventDefault()
5656
e.stopPropagation()
5757
let href = e.target.href
58-
if (href.match(/^http:\/\/|https:\/\/|mailto:\/\//)) {
58+
if (href && href.match(/^http:\/\/|https:\/\/|mailto:\/\//)) {
5959
shell.openExternal(href)
6060
}
6161
}

0 commit comments

Comments
 (0)