fix current route on popstate
This commit is contained in:
parent
38634a0292
commit
9389db7480
1 changed files with 1 additions and 1 deletions
|
|
@ -273,7 +273,7 @@ Mithril = m = new function app(window) {
|
|||
currentRoute = window.location[m.route.mode].slice(modes[m.route.mode].length)
|
||||
var root = arguments[0], defaultRoute = arguments[1], router = arguments[2]
|
||||
redirect = function(source) {
|
||||
var path = source.slice(modes[m.route.mode].length)
|
||||
var path = currentRoute = source.slice(modes[m.route.mode].length)
|
||||
if (!routeByValue(root, router, path)) {
|
||||
m.route(defaultRoute, true)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue