From add79dc759f4dff4733c778f1e842c00d38166eb Mon Sep 17 00:00:00 2001 From: Jeremy Guiselin <jeremy.guiselin@student.ecp.fr> Date: Mon, 20 Mar 2017 13:31:20 +0100 Subject: [PATCH] Update controller.js --- www/js/pages/football/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/js/pages/football/controller.js b/www/js/pages/football/controller.js index 8dee0ef..5b68ce2 100644 --- a/www/js/pages/football/controller.js +++ b/www/js/pages/football/controller.js @@ -127,7 +127,7 @@ $scope.getPredictionClass = function (prediction, value) { var percentages = [prediction.prediction_win_first, prediction.prediction_win_second, prediction.prediction_draw]; - percentages.sort(); + percentages.sort(function(a, b){return a-b}); if (percentages.indexOf(value) === 2) { return "main-prediction"; } else if (percentages.indexOf(value) === 1) { @@ -150,7 +150,7 @@ 'green-tick' ]; - percentages.sort(); + percentages.sort(function(a, b){return a-b}); var predictionWin = null; if (prediction.winner) { if (prediction.winner === -1) { -- GitLab