Skip to content

Commit a4a63da

Browse files
committed
Update correct way to select the active nav item.
1 parent 9b75625 commit a4a63da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Navigation/Navigation.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ export default class Navigation extends React.Component {
171171
let { pageUrl = '' } = this.props;
172172

173173
if (section.children) {
174-
return section.children.some(child => pageUrl.includes(`${child.url}/`));
174+
return section.children.some(child => { return pageUrl == '/' + child.url + '/'; });
175175

176-
} else return pageUrl.includes(`${section.url}/`);
176+
} else return pageUrl.includes('/' + section.url + '/', 0);
177177
}
178178

179179
/**

0 commit comments

Comments
 (0)