Skip to content

Commit

Permalink
Merge pull request #5 from betagouv/fix_missing_results
Browse files Browse the repository at this point in the history
Fix missing results in search
  • Loading branch information
jillro authored Sep 19, 2024
2 parents 17fb6dc + ff27817 commit 61312f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/rechercher/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ async function getResults(query: string): Promise<SearchResultItem[]> {
.filter(([, specialites]) =>
specialites.find(
(s) =>
s.SubsNomId && s.SubsNomId.includes(substance.NomId.trim()),
s.SubsNomId &&
s.SubsNomId.map((id) => id.trim()).includes(
substance.NomId.trim(),
),
),
)
.forEach(([groupName, specialites]) => {
Expand Down

0 comments on commit 61312f0

Please sign in to comment.