From b6ff098fff44266e3d789ea31ea7f23132de2e5e Mon Sep 17 00:00:00 2001
From: Jeremy Guiselin <jeremy.guiselin@student.ecp.fr>
Date: Mon, 20 Mar 2017 13:31:47 +0100
Subject: [PATCH] Update controller.js

---
 www/js/pages/tennis/controller.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/www/js/pages/tennis/controller.js b/www/js/pages/tennis/controller.js
index 976e5f4..b0de11f 100644
--- a/www/js/pages/tennis/controller.js
+++ b/www/js/pages/tennis/controller.js
@@ -121,7 +121,7 @@
         prediction.prediction_win_first,
         prediction.prediction_win_second
       ];
-      percentages.sort();
+      percentages.sort(function(a, b){return a-b});
       if (percentages.indexOf(value) === 1) {
         return "main-prediction";
       }
@@ -154,7 +154,7 @@
         'green-tick'
       ];
 
-      percentages.sort();
+      percentages.sort(function(a, b){return a-b});
       var predictionWin = null;
       if (prediction.winner) {
         predictionWin = prediction.prediction_win_second;
-- 
GitLab