mirror of
https://github.com/zoriya/flood.git
synced 2026-06-01 02:29:01 +00:00
Fix sorting bug
This commit is contained in:
@@ -2,9 +2,8 @@ export function sortTorrents(torrents, sortBy) {
|
||||
if (torrents.length) {
|
||||
let direction = sortBy.direction;
|
||||
let property = sortBy.property;
|
||||
let sortedTorrents = Object.assign([], torrents);
|
||||
|
||||
sortedTorrents.sort(function(a, b) {
|
||||
torrents.sort(function(a, b) {
|
||||
let valA = a[property];
|
||||
let valB = b[property];
|
||||
|
||||
@@ -49,7 +48,7 @@ export function sortTorrents(torrents, sortBy) {
|
||||
return 0;
|
||||
});
|
||||
|
||||
return sortedTorrents;
|
||||
return torrents;
|
||||
} else {
|
||||
return torrents;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user