From 35babc706d6351d5899aa6eb1ee4bf54be88cf04 Mon Sep 17 00:00:00 2001 From: rei2hu Date: Sat, 24 Feb 2018 03:18:42 +0000 Subject: [PATCH] Fix: discord sort method (#2355) --- src/util/Util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/Util.js b/src/util/Util.js index c121c3deb..6cb22a705 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -284,8 +284,8 @@ class Util { static discordSort(collection) { return collection.sort((a, b) => a.rawPosition - b.rawPosition || - parseInt(a.id.slice(0, -10)) - parseInt(b.id.slice(0, -10)) || - parseInt(a.id.slice(10)) - parseInt(b.id.slice(10)) + parseInt(b.id.slice(0, -10)) - parseInt(a.id.slice(0, -10)) || + parseInt(b.id.slice(10)) - parseInt(a.id.slice(10)) ); }