Skip to content

Commit

Permalink
Merge pull request #110 from dbmi-pitt/tjmadonna/hierarchy-subvalues-…
Browse files Browse the repository at this point in the history
…check

Checking if HierarchyFacet subvalues are empty
  • Loading branch information
maxsibilla authored Oct 22, 2024
2 parents 6b7d38e + c377876 commit 535debc
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 535debc

Please sign in to comment.