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
  • Loading branch information
jonesphillip committed Dec 31, 2024
1 parent 76c054f commit 5fd0d34
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 5fd0d34

Please sign in to comment.