fix: compare path components to detect active link in router (#1656)

This commit is contained in:
Florian Wickert 2023-09-06 12:49:10 +02:00 committed by GitHub
parent 495862e9f9
commit db20be5576
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}
})
})