mirror of
https://github.com/LBRYFoundation/lbry-tech.git
synced 2025-03-03 22:47:55 +00:00
fix sidebar active on trailing /
This commit is contained in:
parent
fdef76835a
commit
67dc9aea69
1 changed files with 1 additions and 0 deletions
|
@ -15,6 +15,7 @@ const items = await getCollection(collection) || [];
|
|||
const description = await markdown.parse(frontmatter.description);
|
||||
|
||||
const isActive = (href: string)=>{
|
||||
if (href[href.length - 1] === '/') href.split('').pop().join('');
|
||||
return href === pathname || href === pathname.split('/').slice(0,2).join('/');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue