From d91cfa6543de0101a8d935ad735ef42d6ef56d0a Mon Sep 17 00:00:00 2001 From: winkerVSbecks Date: Fri, 30 Aug 2024 12:45:42 -0400 Subject: [PATCH] fix check for nested active --- src/components/Navigation/CollapsibleGroup.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Navigation/CollapsibleGroup.tsx b/src/components/Navigation/CollapsibleGroup.tsx index 5b157788..cd018b5b 100644 --- a/src/components/Navigation/CollapsibleGroup.tsx +++ b/src/components/Navigation/CollapsibleGroup.tsx @@ -128,9 +128,9 @@ function checkIfSomeActive(group: TransformedNavGroup, url: string): boolean { if (isNestedTransformedGroup(item)) { return item.items.some((nestedItem) => { if (isNestedTransformedGroup(nestedItem)) { - return checkIfSomeActive(group, url); + return checkIfSomeActive(nestedItem, url); } else { - isUrlActive(nestedItem.slug, url); + return isUrlActive(nestedItem.slug, url); } }); } else { @@ -149,6 +149,7 @@ export const CollapsibleGroup = ({ url: string; isHome?: boolean; nested?: boolean; + open?: boolean; }) => { const isSomeActive = checkIfSomeActive(group, url);