Skip to content

Commit

Permalink
removing duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie1977 committed Nov 16, 2022
1 parent b44bfa4 commit 77f51f6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions geppetto-ui/src/search/datasources/SOLRclient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ function refineResults(e) {
newRecord[key] = item[key];
}
});
refinedResults.push(newRecord);
if (!refinedResults.includes(newRecord)) {
refinedResults.push(newRecord);
}
}
});
let newRecord:any = {}
Expand All @@ -255,7 +257,9 @@ function refineResults(e) {
}
}
});
refinedResults.push(newRecord);
if (!refinedResults.includes(newRecord)) {
refinedResults.push(newRecord);
}
} else {
let newRecord:any = {}
Object.keys(item).map(key => {
Expand All @@ -265,7 +269,9 @@ function refineResults(e) {
newRecord[key] = item[key];
}
});
refinedResults.push(newRecord);
if (!refinedResults.includes(newRecord)) {
refinedResults.push(newRecord);
}
}
});

Expand Down

0 comments on commit 77f51f6

Please sign in to comment.