Better sorting syntax
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
This commit is contained in:
parent
bdb60d77f1
commit
09445e82ba
1 changed files with 1 additions and 4 deletions
|
|
@ -121,10 +121,7 @@ export default {
|
|||
|
||||
// Sort options by response count
|
||||
questionOptionsStats.sort((object1, object2) => {
|
||||
if (object1.count === object2.count) {
|
||||
return 0
|
||||
}
|
||||
return object1.count < object2.count ? 1 : -1
|
||||
return object2.count - object1.count
|
||||
})
|
||||
|
||||
// Fill percentage values
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue