Skip to content

Commit

Permalink
Fixes #64
Browse files Browse the repository at this point in the history
  • Loading branch information
cognitom committed Jul 30, 2016
1 parent 662be2d commit 2dbd31d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/index.js
Expand Up @@ -150,13 +150,13 @@ function click(e) {
|| el.href.indexOf(loc.href.match(RE_ORIGIN)[0]) == -1 // cross origin
) return

if (el.href != loc.href) {
if (
if (el.href != loc.href
&& (
el.href.split('#')[0] == loc.href.split('#')[0] // internal jump
|| base != '#' && getPathFromRoot(el.href).indexOf(base) !== 0 // outside of base
|| base[0] != '#' && getPathFromRoot(el.href).indexOf(base) !== 0 // outside of base
|| base[0] == '#' && el.href.split(base)[0] != loc.href.split(base)[0] // outside of #base
|| !go(getPathFromBase(el.href), el.title || doc.title) // route not found
) return
}
)) return

e.preventDefault()
}
Expand Down

0 comments on commit 2dbd31d

Please sign in to comment.