Merge pull request #1115 from PolarizedIons/fix-sorting
Fix channel sorting messing up the order
This commit is contained in:
commit
8ad92ed7b7
@ -423,7 +423,7 @@ Client.prototype.sort = function(data) {
|
|||||||
switch (data.type) {
|
switch (data.type) {
|
||||||
case "networks":
|
case "networks":
|
||||||
this.networks.sort((a, b) => {
|
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
|
// Sync order to connected clients
|
||||||
@ -438,7 +438,7 @@ Client.prototype.sort = function(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
network.channels.sort((a, b) => {
|
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
|
// Sync order to connected clients
|
||||||
|
Loading…
Reference in New Issue
Block a user