[Changelog] Fix multi-product entries bug (#25234)

This commit is contained in:
Kody Jackson 2025-09-17 09:32:23 -05:00 committed by GitHub
parent c646ca2350
commit 311cecf81e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 7 deletions

View file

@ -4,5 +4,11 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"typescript.tsdk": "node_modules/typescript/lib",
"cSpell.enableFiletypes": ["mdx"],
"files.associations": { "__redirects": "plaintext", "_headers": "plaintext" }
"files.associations": {
"__redirects": "plaintext",
"_headers": "plaintext"
},
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
}
}

View file

@ -22,13 +22,16 @@ const seen = new Map<string, number>();
notes = notes.flatMap((note) => {
const products = note.data.products.map((product) => product.id);
for (const product of products) {
const previous = seen.get(product) || 0;
// PCX-19256 - We only want to count dedicated entries against the product length, otherwise specific entries can get obscured
if (products.length === 1) {
for (const product of products) {
const previous = seen.get(product) || 0;
seen.set(product, previous + 1);
seen.set(product, previous + 1);
if (previous >= 5) {
return [];
if (previous >= 5) {
return [];
}
}
}
@ -152,7 +155,7 @@ const props = {
const filtered = entries
.filter((e) => filterByProduct(e, value))
.slice(0, 5);
.slice(0, 10);
for (const entry of entries) {
const show = filtered.includes(entry);