Skip to content

Commit 0f919df

Browse files
committed
fix: don't render a menu item for injected routes that have no label
1 parent 2a5eede commit 0f919df

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/shaggy-hands-think.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"strapi-plugin-webtools": patch
3+
---
4+
5+
fix: don't render a menu item for injected routes that have no label

packages/core/admin/containers/App/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const App = () => {
6969
</SubNavSection>
7070
{routerComponents.length > 0 && (
7171
<SubNavSection label="Addons">
72-
{routerComponents.map(({ path, label }) => (
72+
{routerComponents.map(({ path, label }) => label && (
7373
<SubNavLink tag={Link} to={`/plugins/webtools${path}`} key={path} className={currentPath.startsWith(`/plugins/webtools${path}`) ? 'active' : ''}>
7474
{label}
7575
</SubNavLink>

0 commit comments

Comments
 (0)