#1342 update m.route.link target if href changes

This commit is contained in:
Leo Horie 2016-10-04 12:19:55 -04:00
parent 0e918f14c2
commit 40251c6c16
7 changed files with 153 additions and 44 deletions

View file

@ -114,7 +114,9 @@ module.exports = function($window) {
vnode.dom.onclick = function(e) {
e.preventDefault()
e.redraw = false
setPath(vnode.attrs.href, undefined, undefined)
var href = this.getAttribute("href")
if (href.indexOf(prefix) === 0) href = href.slice(prefix.length)
setPath(href, undefined, undefined)
}
}