diff --git a/mithril.js b/mithril.js index 50479b0d..1949e13e 100644 --- a/mithril.js +++ b/mithril.js @@ -548,7 +548,7 @@ Mithril = m = new function app(window, undefined) { var context = arguments[2] if (!isInitialized) { context.href = element.getAttribute("href") - element.href = window.location.pathname + modes[m.route.mode] + context.href + element.href = (m.route.mode !== 'pathname' ? window.location.pathname : '') + modes[m.route.mode] + context.href element.removeEventListener("click", routeUnobtrusive) element.addEventListener("click", routeUnobtrusive) }