Skip to content

Commit 9b74c24

Browse files
committed
Fix issue with 'All Challenges' link.
1 parent 4938269 commit 9b74c24

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/TopNav/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,10 @@ const TopNav = ({
459459

460460
if (path.indexOf('/challenges') > -1) {
461461
// If All Challenge page
462-
if (path.match(/challenges\/[0-9]+/)) {
462+
if (path.match(/challenges\/[\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12}|\d{5,8}/)) {
463463
// If Challenge Details page
464464
setforceHideLevel3(true)
465-
forceM2 = getMenuIdsFromPath(menuWithId, '/challenges').m2
465+
forceM2 = getMenuIdsFromPath(menuWithId, path).m2
466466
}
467467
} else if (path.indexOf('/my-dashboard') > -1 || path.indexOf('/members/' + profileHandle) > -1) {
468468
// If My Dashboard and My Profile page

0 commit comments

Comments
 (0)