From 9b74c24102a7e448462ce2389b123fa6cea419a0 Mon Sep 17 00:00:00 2001 From: narekcat Date: Wed, 9 Sep 2020 20:37:57 +0400 Subject: [PATCH] Fix issue with 'All Challenges' link. --- src/components/TopNav/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/TopNav/index.js b/src/components/TopNav/index.js index 3d2dcea..dce4028 100644 --- a/src/components/TopNav/index.js +++ b/src/components/TopNav/index.js @@ -459,10 +459,10 @@ const TopNav = ({ if (path.indexOf('/challenges') > -1) { // If All Challenge page - if (path.match(/challenges\/[0-9]+/)) { + if (path.match(/challenges\/[\w]{8}-[\w]{4}-[\w]{4}-[\w]{4}-[\w]{12}|\d{5,8}/)) { // If Challenge Details page setforceHideLevel3(true) - forceM2 = getMenuIdsFromPath(menuWithId, '/challenges').m2 + forceM2 = getMenuIdsFromPath(menuWithId, path).m2 } } else if (path.indexOf('/my-dashboard') > -1 || path.indexOf('/members/' + profileHandle) > -1) { // If My Dashboard and My Profile page