Skip to content

Commit b122a99

Browse files
authored
Fixed issue that produced duplicate products in the changelog-next header (#18972)
1 parent ce25026 commit b122a99

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)