fix: prevents duplicate active nav indicators (#7943)

This commit is contained in:
Jarrod Flesch
2024-08-29 00:11:42 -04:00
committed by GitHub
parent 570422ff9a
commit de3d7c95e7

View File

@@ -88,7 +88,8 @@ export const DefaultNavClient: React.FC = () => {
LinkWithDefault) as typeof LinkWithDefault.default
const LinkElement = Link || 'a'
const activeCollection = pathname.startsWith(href)
const activeCollection =
pathname.startsWith(href) && ['/', undefined].includes(pathname[href.length])
return (
<LinkElement