mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
Fix channel sorting messing up the order
This commit is contained in:
parent
5eb5b99115
commit
dd48ba4e87
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue