reference window correctly

This commit is contained in:
Leo Horie 2014-06-05 22:11:51 -04:00
parent 647208f3a0
commit 33ac4fc7d1

View file

@ -310,7 +310,7 @@ Mithril = m = new function app(window) {
var element = arguments[0]
var isInitialized = arguments[1]
if (element.href.indexOf(modes[m.route.mode]) < 0) {
element.href = location.pathname + modes[m.route.mode] + element.pathname
element.href = window.location.pathname + modes[m.route.mode] + element.pathname
}
if (!isInitialized) {
element.removeEventListener("click", routeUnobtrusive)