Skip to content

Commit

Permalink
fix: harden createBreadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
elbotho committed Apr 11, 2024
1 parent fb02b12 commit 102b35e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/web/src/fetcher/create-breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export function taxonomyParentsToRootToBreadcrumbsData(
}
})

if (!breadcrumbs?.length) return undefined

if (includeFirstParent) {
breadcrumbs.push({
label: term.title,
Expand Down

0 comments on commit 102b35e

Please sign in to comment.