Fix to Prod
This commit is contained in:
		| @@ -144,8 +144,24 @@ export const ResultadosRankingMunicipioWidget = () => { | ||||
|                                     <td className="sticky-col">{municipio.municipioNombre}</td> | ||||
|                                     {rankingData.categorias.flatMap(cat => { | ||||
|                                         const resCategoria = municipio.resultadosPorCategoria[cat.id]; | ||||
|                                         const primerPuesto = resCategoria?.ranking[0]; | ||||
|                                         const segundoPuesto = resCategoria?.ranking[1]; | ||||
|                                         const primerPuestoRaw = resCategoria?.ranking[0]; | ||||
|                                         const segundoPuestoRaw = resCategoria?.ranking[1]; | ||||
|  | ||||
|                                         // Asegurarse que los objetos tengan la propiedad 'votos' | ||||
|                                         const primerPuesto = primerPuestoRaw | ||||
|                                             ? { | ||||
|                                                 nombreCorto: primerPuestoRaw.nombreCorto, | ||||
|                                                 porcentaje: primerPuestoRaw.porcentaje, | ||||
|                                                 votos: 'votos' in primerPuestoRaw ? (primerPuestoRaw as any).votos : 0 | ||||
|                                             } | ||||
|                                             : undefined; | ||||
|                                         const segundoPuesto = segundoPuestoRaw | ||||
|                                             ? { | ||||
|                                                 nombreCorto: segundoPuestoRaw.nombreCorto, | ||||
|                                                 porcentaje: segundoPuestoRaw.porcentaje, | ||||
|                                                 votos: 'votos' in segundoPuestoRaw ? (segundoPuestoRaw as any).votos : 0 | ||||
|                                             } | ||||
|                                             : undefined; | ||||
|  | ||||
|                                         return [ | ||||
|                                             // --- Celdas para el 1° Puesto --- | ||||
|   | ||||
		Reference in New Issue
	
	Block a user