From c17ea5bbc83ff7eb752c92ad4e6e77e3d89a2ca0 Mon Sep 17 00:00:00 2001 From: darda Date: Thu, 23 Jun 2016 08:49:18 +0200 Subject: [PATCH] Push route to history stack, when using parameters Bugfix for issue #1124 The condition has been changed, which is deciding to push the a route to history stack. I think, it is necessary to compare the old route with the current route, instead of old route with root (without parameters). --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index 4e972b89..7ec24ab1 100644 --- a/mithril.js +++ b/mithril.js @@ -1664,7 +1664,7 @@ var replaceHistory = (arguments.length === 3 ? arg2 : arg1) === true || - previousRoute === root + previousRoute === currentRoute if (global.history.pushState) { var method = replaceHistory ? "replaceState" : "pushState"