projects
/
westcastle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6fc9bad
)
Fix bug while setting score (pairings component)
author
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 28 Dec 2017 14:39:15 +0000
(15:39 +0100)
committer
Benjamin Auder
<benjamin.auder@somewhere>
Thu, 28 Dec 2017 14:39:15 +0000
(15:39 +0100)
js/index.js
patch
|
blob
|
blame
|
history
diff --git
a/js/index.js
b/js/index.js
index
02e490e
..
0d2adad
100644
(file)
--- 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;