Skip to content

Commit 166a07b

Browse files
authored
Merge pull request #6330 from GARY121github/fix/6329
fix : highlight active section when switching tabs
2 parents 1cb21d4 + 3576048 commit 166a07b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • src/components/SistentNavigation

src/components/SistentNavigation/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const TOC = () => {
139139
<Link
140140
to={component.url}
141141
className={`toc-sub-heading toc-sub-inline components-item ${
142-
location.pathname === component.url
142+
location.pathname.split("/")[4] === component.url.split("/")[4]
143143
? "active"
144144
: ""
145145
}`}

0 commit comments

Comments
 (0)