From 5aa25b69cad0d4bb9977e9ac8dfb16f4e542a964 Mon Sep 17 00:00:00 2001 From: gsd Date: Wed, 25 Oct 2023 19:03:49 +0300 Subject: [PATCH] sorting --- src/api/GlobalApi.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/GlobalApi.js b/src/api/GlobalApi.js index 8926661..a39d384 100644 --- a/src/api/GlobalApi.js +++ b/src/api/GlobalApi.js @@ -105,7 +105,7 @@ export default class GlobalApi { else if (response[srv]['player_count'] > 0) srvs.w.push(response[srv]); else srvs.e.push(response[srv]); } - srvs['w'].sort((s1,s2) => s2.player_now - s1.player_now); + srvs['w'] = srvs['w'].sort((s1,s2) => s2.player_count - s1.player_count); this.stats['servers'] = srvs; }) .catch(err => {