Skip to content

Commit a6e91f1

Browse files
committed
fix: no herf
1 parent da2dc19 commit a6e91f1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/output/srcdoc.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@
8989
el.hasAttribute('download') ||
9090
el.getAttribute('rel') === 'external' ||
9191
el.target ||
92-
el.href.startsWith('javascript:')
92+
el.href.startsWith('javascript:') ||
93+
!el.href
9394
)
9495
return
9596

@@ -102,9 +103,8 @@
102103
return
103104
}
104105
}
105-
if(el.href){
106-
window.open(el.href, '_blank')
107-
}
106+
107+
window.open(el.href, '_blank')
108108
})
109109
send_ok()
110110
} catch (e) {

0 commit comments

Comments
 (0)