#290 fix m.route hrefs for pathname mode
This commit is contained in:
parent
1fa946110a
commit
8d2434ac21
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue