X-Git-Url: https://git.auder.net/?p=westcastle.git;a=blobdiff_plain;f=js%2Findex.js;h=0d2adad0026adcdd1c931675ff836ca2f7d9a7d9;hp=02e490e30312bc9d3661d6bc64e7af8703670ee0;hb=ce0473b4fac73ad9ac63cf8fa480548817349804;hpb=6fc9bad083cd640355d5c31065df71ad189d0bb4 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;