Skip to content

Commit b4561f9

Browse files
committed
fix: release links with different host value;
- Closes #3
1 parent 64da2b0 commit b4561f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function Navaid(base, on404) {
4848

4949
function click(e) {
5050
var y, x = e.target.closest('a');
51-
if (!x || !x.href || x.target) return;
51+
if (!x || !x.href || x.target || x.host !== location.host) return;
5252
if (e.ctrlKey || e.metaKey || e.altKey || e.shiftKey || e.button) return;
5353
if (y = fmt(x.getAttribute('href'))) {
5454
e.preventDefault();

0 commit comments

Comments
 (0)