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