From dd48ba4e87dbcf3d5bbc28dc29b95fd3fe367dae Mon Sep 17 00:00:00 2001 From: PolarizedIons Date: Sat, 29 Apr 2017 13:17:21 +0200 Subject: [PATCH] Fix channel sorting messing up the order --- src/client.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.js b/src/client.js index aa3b7045..8f0d06ba 100644 --- a/src/client.js +++ b/src/client.js @@ -422,7 +422,7 @@ Client.prototype.sort = function(data) { switch (data.type) { case "networks": this.networks.sort((a, b) => { - return order.indexOf(a.id) > order.indexOf(b.id); + return order.indexOf(a.id) - order.indexOf(b.id); }); // Sync order to connected clients @@ -437,7 +437,7 @@ Client.prototype.sort = function(data) { } network.channels.sort((a, b) => { - return order.indexOf(a.id) > order.indexOf(b.id); + return order.indexOf(a.id) - order.indexOf(b.id); }); // Sync order to connected clients