Skip to content

Commit

Permalink
fix sort
Browse files Browse the repository at this point in the history
  • Loading branch information
kdudkov committed Apr 21, 2024
1 parent f897ec5 commit 54306d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions staticfiles/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ let app = new Vue({
return u.category === s
});
arr.sort(function (a, b) {
let ua = a.callsign.toLowerCase(), ub = b.callsign.toLowerCase();
if (ua < ub) return -1;
if (ua > ub) return 1;
return 0;
return a.callsign.toLowerCase().localeCompare(b.callsign.toLowerCase());
});
return this.ts && arr;
},
Expand Down
5 changes: 1 addition & 4 deletions staticfiles/static/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,7 @@ let app = new Vue({
return u.category === s
});
arr.sort(function (a, b) {
let ua = a.callsign.toLowerCase(), ub = b.callsign.toLowerCase();
if (ua < ub) return -1;
if (ua > ub) return 1;
return 0;
return a.callsign.toLowerCase().localeCompare(b.callsign.toLowerCase());
});
return this.ts && arr;
},
Expand Down

0 comments on commit 54306d3

Please sign in to comment.