Skip to content

Commit

Permalink
Checking if HierarchyFacet subvalues are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tjmadonna committed Oct 18, 2024
1 parent 95de585 commit c377876
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/core/HierarchyFacet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export default function HierarchyFacet({
subValues = facet.filterSubValues(option.key, subValues)
}

if (subValues.length === 0) {
console.error('No HierarchyFacet subvalues found for option', option)
return null
}

const firstBucket = subValues[0]
return (
<TermOptionFacet
Expand Down

0 comments on commit c377876

Please sign in to comment.