From 8c94a4b8821d4efc6695b1856328a29c3008f0a1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Thu, 11 Aug 2022 13:59:06 -0500 Subject: [PATCH] ProfilePage: more pathname.endsWith fixes --- app/soapbox/pages/profile_page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/soapbox/pages/profile_page.tsx b/app/soapbox/pages/profile_page.tsx index 854d85400..bcf6ef081 100644 --- a/app/soapbox/pages/profile_page.tsx +++ b/app/soapbox/pages/profile_page.tsx @@ -81,11 +81,11 @@ const ProfilePage: React.FC = ({ params, children }) => { let activeItem; const pathname = history.location.pathname.replace(`@${username}/`, ''); - if (pathname.includes('with_replies')) { + if (pathname.endsWith('/with_replies')) { activeItem = 'replies'; - } else if (pathname.includes('media')) { + } else if (pathname.endsWith('/media')) { activeItem = 'media'; - } else if (pathname.includes('favorites')) { + } else if (pathname.endsWith('/favorites')) { activeItem = 'likes'; } else { activeItem = 'profile';