From ce0473b4fac73ad9ac63cf8fa480548817349804 Mon Sep 17 00:00:00 2001 From: Benjamin Auder <benjamin.auder@somewhere> Date: Thu, 28 Dec 2017 15:39:15 +0100 Subject: [PATCH] Fix bug while setting score (pairings component) --- js/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/index.js b/js/index.js index 02e490e..0d2adad 100644 --- a/js/index.js +++ b/js/index.js @@ -154,8 +154,8 @@ new Vue({ }, setScore: function() { let sortedSessions = this.sessions[this.currentIndex] - .map( (s,i) => { return {value:s, index:i}; }) - .sort( (a,b) => { return parseInt(b.value) - parseInt(a.value); }); + .map( (s,i) => { return {value:parseInt(s), index:i}; }) + .sort( (a,b) => { return b.value - a.value; }); let pdts = [4, 2, 1, 0]; // NOTE: take care of ex-aequos (spread points subtotal) let curSum = 0, curCount = 0, start = 0; -- 2.44.0