From c377876b715794f39842f8c0d37880813d4414fb Mon Sep 17 00:00:00 2001 From: Tyler Madonna Date: Fri, 18 Oct 2024 11:10:54 -0400 Subject: [PATCH] Checking if HierarchyFacet subvalues are empty --- components/core/HierarchyFacet.jsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/core/HierarchyFacet.jsx b/components/core/HierarchyFacet.jsx index 707a5b5..63dd4b8 100644 --- a/components/core/HierarchyFacet.jsx +++ b/components/core/HierarchyFacet.jsx @@ -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 (