Skip to content

Commit

Permalink
fix(search): show filters for added sources
Browse files Browse the repository at this point in the history
  • Loading branch information
candicecz committed May 17, 2024
1 parent 1631bac commit 3ca39eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/filters/components/filters-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export const FiltersList: React.FC<FiltersList> = React.memo(
? items
.filter(item => {
const repo = REPOS.repositories.find(r => r.id === item.term);
// if repo is undefined, show the item as a generalist
if (repo === undefined) {
return item;
}
return repo && repo.type === 'generalist';
})
.sort((a, b) => a.displayAs.localeCompare(b.displayAs))
Expand Down

0 comments on commit 3ca39eb

Please sign in to comment.