diff --git a/nupes-elections-front/src/includes/composants_elections_legislatives.js b/nupes-elections-front/src/includes/composants_elections_legislatives.js index 743d7c2..e014cd2 100644 --- a/nupes-elections-front/src/includes/composants_elections_legislatives.js +++ b/nupes-elections-front/src/includes/composants_elections_legislatives.js @@ -47,7 +47,7 @@ function LigneCandidat({candidat, voix_t1, voix_t2, donnees_t1, donnees_t2, nuan const nuance = nuances.filter(nuance => nuance.code === candidat.nuance)[0] const bloc = blocs.filter(bloc => bloc.nom === candidat.bloc)[0] - const gagnant = voix_t2 === Math.max(...Object.values(donnees_t2.voix)) + const gagnant = (voix_t2 > 0 && voix_t2 === Math.max(...Object.values(donnees_t2.voix))) || (voix_t1 === Math.max(...Object.values(donnees_t1.voix)) && voix_t1 / donnees_t1.exprimes >= 0.5 && voix_t1 / donnees_t1.inscrits >= 0.25)