Skip to content

Commit b9b7dec

Browse files
authored
Merge pull request #8 from betagouv/fix_duplicates_2
Duplicates in substance results
2 parents 310a3a5 + 33cedfa commit b9b7dec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/app/rechercher/page.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ async function getResults(query: string): Promise<SearchResultItem[]> {
117117
)
118118
.forEach(([groupName, specialites]) => {
119119
if (
120-
!acc.find((a) => "groupName" in a && a.groupName === groupName)
120+
!acc.find(
121+
({ item }) =>
122+
"groupName" in item && item.groupName === groupName,
123+
)
121124
) {
122125
let directMatch = matches.find(
123126
(m) =>

0 commit comments

Comments
 (0)