From 09445e82ba02ed76d2e55c14e5e5b70b5beb1e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Tue, 7 Jul 2020 11:40:06 +0200 Subject: [PATCH] Better sorting syntax Signed-off-by: Jan-Christoph Borchardt --- src/components/Results/Summary.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/components/Results/Summary.vue b/src/components/Results/Summary.vue index a5bcd19..6ba3573 100644 --- a/src/components/Results/Summary.vue +++ b/src/components/Results/Summary.vue @@ -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