#304 parse querystring correctly in routed links
This commit is contained in:
parent
0f90850b28
commit
121ed385cd
1 changed files with 2 additions and 1 deletions
|
|
@ -606,7 +606,8 @@ Mithril = m = new function app(window, undefined) {
|
||||||
if (e.preventDefault) e.preventDefault()
|
if (e.preventDefault) e.preventDefault()
|
||||||
else e.returnValue = false
|
else e.returnValue = false
|
||||||
var currentTarget = e.currentTarget || this
|
var currentTarget = e.currentTarget || this
|
||||||
m.route(currentTarget[m.route.mode].slice(modes[m.route.mode].length))
|
var args = m.route.mode == "pathname" && currentTarget.search ? parseQueryString(currentTarget.search.slice(1)) : {}
|
||||||
|
m.route(currentTarget[m.route.mode].slice(modes[m.route.mode].length), args)
|
||||||
}
|
}
|
||||||
function setScroll() {
|
function setScroll() {
|
||||||
if (m.route.mode != "hash" && window.location.hash) window.location.hash = window.location.hash
|
if (m.route.mode != "hash" && window.location.hash) window.location.hash = window.location.hash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue