Merge pull request 'fix(ecommerce): corregir error de tipos en indice de tile promocional' (#42) from fix/etapa2-subfase3-fix-promo-index-type into main
Build and Push Frontend / Escaneo de Secretos (Gitleaks) (push) Successful in 20s
Build and Push Frontend / Construir y Subir Imagen (push) Successful in 9m29s

This commit was merged in pull request #42.
This commit is contained in:
devops committed 2026-08-25 20:19:26 +00:00
commit b6e3bddbc6
1 file changed
+3 -2
@@ -144,8 +144,9 @@ export function CatalogClient({
filtered.forEach((product, index) => {
items.push({ type: "product", product });
const isLast = index === filtered.length - 1;
if (!isLast && (index + 1) % PROMO_TILE_INTERVAL === 0) {
items.push({ type: "promo", category: promoRoots[promoIndex % promoRoots.length] });
const promoCategory = promoRoots[promoIndex % promoRoots.length];
if (!isLast && (index + 1) % PROMO_TILE_INTERVAL === 0 && promoCategory) {
items.push({ type: "promo", category: promoCategory });
promoIndex += 1;
}
});