Skip to content

Commit

Permalink
Fixed issue that produced duplicate products in the changelog-next he…
Browse files Browse the repository at this point in the history
…ader (#18972)
  • Loading branch information
jonesphillip authored Dec 31, 2024
1 parent ce25026 commit b122a99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/changelog-next/Header.astro
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ async function uniqueProducts(
) {
const products = entries?.flatMap((entry) => entry.data.products ?? []);
const unique = [...new Set(products)];
const unique = [
...new Map(products?.map((product) => [product.id, product])).values(),
];
return Promise.all(
unique.map(async (product) => {
Expand Down

0 comments on commit b122a99

Please sign in to comment.