Skip to content

Commit

Permalink
Merge pull request #8 from betagouv/fix_duplicates_2
Browse files Browse the repository at this point in the history
Duplicates in substance results
  • Loading branch information
jillro authored Sep 30, 2024
2 parents 310a3a5 + 33cedfa commit b9b7dec
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 @@ -117,7 +117,10 @@ async function getResults(query: string): Promise<SearchResultItem[]> {
)
.forEach(([groupName, specialites]) => {
if (
!acc.find((a) => "groupName" in a && a.groupName === groupName)
!acc.find(
({ item }) =>
"groupName" in item && item.groupName === groupName,
)
) {
let directMatch = matches.find(
(m) =>
Expand Down

0 comments on commit b9b7dec

Please sign in to comment.