overzealous slash reduction

This commit is contained in:
Anton Dyudin 2015-10-21 17:10:54 -07:00
parent c6ef8e1319
commit 0708e2dd57
2 changed files with 2 additions and 2 deletions

View File

@ -106,7 +106,7 @@ module.exports = query {
e.preventDefault()
e.stopPropagation()
if href?[0] isnt "/"
href = (document.location.pathname.replace /\/?[^\/]*$/, '') + href
href = (document.location.pathname.replace /[^\/]*$/, '') + href
_this.goTo window.tree.fragpath href
if id
window.location.hash = id

View File

@ -233,7 +233,7 @@ module.exports = query({
e.preventDefault();
e.stopPropagation();
if ((href != null ? href[0] : void 0) !== "/") {
href = (document.location.pathname.replace(/\/?[^\/]*$/, '')) + href;
href = (document.location.pathname.replace(/[^\/]*$/, '')) + href;
}
_this.goTo(window.tree.fragpath(href));
}