Skip to content
Snippets Groups Projects
Verified Commit c2bc782d authored by Jakob Moser's avatar Jakob Moser
Browse files

Also treat empty route as /

parent c5fbc21e
No related branches found
No related tags found
No related merge requests found
Pipeline #6444 passed
export const NavPageLink = {
view(vnode) {
const href = vnode.attrs.href
const current = m.route.get() === href
const currentRoute = m.route.get()
const isCurrent =
currentRoute === href || (currentRoute === "" && href === "/")
return m(
m.route.Link,
{ href, class: current ? "current" : "" },
{ href, class: isCurrent ? "current" : "" },
vnode.attrs.label,
)
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment