Skip to content

Commit d615a6e

Browse files
committed
New control added to path.
1 parent a33e216 commit d615a6e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/DocsNav.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ const DocsNav = ({ contentNotTranslated }: DocsNavProps) => {
128128
// Find index that matches current page
129129
let currentIndex = 0
130130
for (let i = 0; i < docsArray.length; i++) {
131-
if (asPath.indexOf(docsArray[i].to) > -1) {
131+
if (
132+
asPath.indexOf(docsArray[i].to) > -1 &&
133+
asPath.length === docsArray[i].to.length
134+
) {
132135
currentIndex = i
133136
}
134137
}

0 commit comments

Comments
 (0)