Skip to content

Commit

Permalink
fix: duplicates in substance results
Browse files Browse the repository at this point in the history
Signed-off-by: Maud Royer <[email protected]>
  • Loading branch information
jillro committed Sep 30, 2024
1 parent 310a3a5 commit 33cedfa
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 33cedfa

Please sign in to comment.