Skip to content

Commit

Permalink
fix: avoid nested anchor when child is button
Browse files Browse the repository at this point in the history
  • Loading branch information
Leobel Izquierdo committed Sep 13, 2024
1 parent d894c72 commit 1e179fa
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function generateMenuItem(item: IGlobalNavigationItem, i: number) {
const childrenWithExpandedIcons = item.children.map(({ hrefOptions, ...child }, index) => ({
...child,
key: `${String(child.label)}${index}`,
label: buildLinkFromHrefOptions(child.label, hrefOptions),
label: child.type === 'button' ? child.label : buildLinkFromHrefOptions(child.label, hrefOptions),
}))

childrenWithExpandedIcons.forEach((child, index) => {
Expand Down

0 comments on commit 1e179fa

Please sign in to comment.