From aacc618dfdeabb329d660acf6398960b0b0af19f Mon Sep 17 00:00:00 2001 From: Leo Horie Date: Mon, 26 Jan 2015 22:08:31 -0500 Subject: [PATCH] #428 don't add history entry on reload from link --- mithril.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mithril.js b/mithril.js index 90cf3c34..cc557cbe 100644 --- a/mithril.js +++ b/mithril.js @@ -623,7 +623,7 @@ var m = (function app(window, undefined) { var currentPath = queryIndex > -1 ? currentRoute.slice(0, queryIndex) : currentRoute if (querystring) currentRoute = currentPath + (currentPath.indexOf("?") === -1 ? "?" : "&") + querystring; - var shouldReplaceHistoryEntry = (arguments.length === 3 ? arguments[2] : arguments[1]) === true; + var shouldReplaceHistoryEntry = (arguments.length === 3 ? arguments[2] : arguments[1]) === true || currentRoute === arguments[0]; if (window.history.pushState) { computePostRedrawHook = function() {