From 9389db7480d8128c00bfb906fb642ceacb465a14 Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Sun, 25 May 2014 15:38:42 -0400 Subject: [PATCH] fix current route on popstate --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index d7d299c3..28827a5a 100644 --- a/mithril.js +++ b/mithril.js @@ -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) }