mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix: compare path components to detect active link in router (#1656)
This commit is contained in:
parent
495862e9f9
commit
db20be5576
1 changed files with 2 additions and 1 deletions
|
@ -133,7 +133,8 @@ where
|
|||
if exact {
|
||||
loc == path
|
||||
} else {
|
||||
loc.starts_with(&path)
|
||||
std::iter::zip(loc.split('/'), path.split('/'))
|
||||
.all(|(loc_p, path_p)| loc_p == path_p)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue