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

check href exists

This commit is contained in:
Rokt33r
2016-01-22 08:00:26 +09:00
parent ddea2aeb22
commit ce74e69480

View File

@@ -55,7 +55,7 @@ function handleAnchorClick (e) {
e.preventDefault()
e.stopPropagation()
let href = e.target.href
if (href.match(/^http:\/\/|https:\/\/|mailto:\/\//)) {
if (href && href.match(/^http:\/\/|https:\/\/|mailto:\/\//)) {
shell.openExternal(href)
}
}