Skip to content
Snippets Groups Projects
Commit add79dc7 authored by Jeremy Guiselin's avatar Jeremy Guiselin
Browse files

Update controller.js

parent f219e3da
Branches
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
$scope.getPredictionClass = function (prediction, value) { $scope.getPredictionClass = function (prediction, value) {
var percentages = [prediction.prediction_win_first, prediction.prediction_win_second, prediction.prediction_draw]; 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) { if (percentages.indexOf(value) === 2) {
return "main-prediction"; return "main-prediction";
} else if (percentages.indexOf(value) === 1) { } else if (percentages.indexOf(value) === 1) {
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
'green-tick' 'green-tick'
]; ];
percentages.sort(); percentages.sort(function(a, b){return a-b});
var predictionWin = null; var predictionWin = null;
if (prediction.winner) { if (prediction.winner) {
if (prediction.winner === -1) { if (prediction.winner === -1) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment