Skip to content

Commit f14d749

Browse files
committed
Fixed issue that produced duplicate products in the changelog-next header
1 parent 76c054f commit f14d749

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/changelog-next/Header.astro

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ async function uniqueProducts(
1919
) {
2020
const products = entries?.flatMap((entry) => entry.data.products ?? []);
2121
22-
const unique = [...new Set(products)];
22+
const unique = [
23+
...new Map(products?.map((product) => [product.id, product])).values(),
24+
];
2325
2426
return Promise.all(
2527
unique.map(async (product) => {

0 commit comments

Comments
 (0)