From 6f9fd4032c08b0ef5db50da82ac5a86641723f10 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Mon, 24 Jun 2024 10:41:46 +0200 Subject: [PATCH] tri.js : simplification tri par responsable --- tri.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tri.js b/tri.js index af263af..366febe 100644 --- a/tri.js +++ b/tri.js @@ -152,9 +152,8 @@ function trierResp(tresp, tnoms, tnumeros, croissant = true) if (a.resp == '') { return 1; } if (b.resp == '') { return -1; } - // deux resp non vides - let comp = a.resp.localeCompare(b.resp); - if (comp == 0) { comp = a.nom.localeCompare(b.nom); } + // deux resp non vides (forcément = "Oui") + let comp = a.nom.localeCompare(b.nom); if (comp == 0) { comp = a.numero - b.numero; } return comp * ordre; });