From 5fd0d34a4f265f133e1f9b833db1ace3e92a46cc Mon Sep 17 00:00:00 2001 From: Phillip Jones Date: Tue, 31 Dec 2024 08:19:31 -0800 Subject: [PATCH] Fixed issue that produced duplicate products in the changelog-next header --- src/components/changelog-next/Header.astro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/changelog-next/Header.astro b/src/components/changelog-next/Header.astro index a4e8f26daf18aa..66c82a4fac1a80 100644 --- a/src/components/changelog-next/Header.astro +++ b/src/components/changelog-next/Header.astro @@ -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) => {