From a1796e668eb07794ccb7d61d985f89591e4c24da Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Tue, 7 Apr 2020 11:31:14 +1200 Subject: [PATCH] Correcting active link detection --- src/js/components/Link.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/components/Link.js b/src/js/components/Link.js index 8ea10930..c3855a5d 100755 --- a/src/js/components/Link.js +++ b/src/js/components/Link.js @@ -45,7 +45,7 @@ export default ({ // they're otherwise identical const link = decodeURIComponent(to); const currentLink = decodeURIComponent(history.location.pathname); - const isLinkActive = (exact && currentLink === link) || currentLink.startsWith(link); + const isLinkActive = exact ? currentLink === link : currentLink.startsWith(link); // We have an active detector method // This is used almost solely by the Sidebar navigation