Fix analysis sorting
Return value of the sort compare function is defined as value less, equal or greater than 0, not as boolean.
This commit is contained in:
parent
eb0e0d6f1e
commit
71317b84e4
1 changed files with 1 additions and 1 deletions
|
|
@ -190,7 +190,7 @@ BR.TrackAnalysis = L.Class.extend({
|
|||
}
|
||||
|
||||
analysisSortable[type].sort(function(a, b) {
|
||||
return a.distance < b.distance;
|
||||
return b.distance - a.distance;
|
||||
});
|
||||
|
||||
for (var j = 0; j < analysisSortable[type].length; j++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue