Fix channel sorting messing up the order
This commit is contained in:
parent
5eb5b99115
commit
dd48ba4e87
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user