Skip to content

Commit

Permalink
Fallback for missing search_sections
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Feb 2, 2023
1 parent a79bbfd commit 7e28942
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/components/Searchkit/SectionsSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,19 @@ const _SectionsSearch = ({
Website
</button>
) : null}
{search_sections.items.map((el) => {
return (
<button
key={el.section}
className={activeSection === el.section ? 'active' : ''}
onClick={() => restrictSearchToSection(el.section)}
>
{el.label}
</button>
);
})}
{search_sections
? search_sections.items.map((el) => {
return (
<button
key={el.section}
className={activeSection === el.section ? 'active' : ''}
onClick={() => restrictSearchToSection(el.section)}
>
{el.label}
</button>
);
})
: null}
</div>
{/* <StateLogger /> */}
</>
Expand Down

0 comments on commit 7e28942

Please sign in to comment.