From 8b45bc81ad58d5b5181ee5e44755075a940fcc42 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Fri, 21 Jun 2024 00:24:07 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20affichage=20personne=20=C3=A9lue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/includes/composants_elections_legislatives.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)