diff --git a/staticfiles/static/js/main.js b/staticfiles/static/js/main.js index d891f67..aa30ef6 100644 --- a/staticfiles/static/js/main.js +++ b/staticfiles/static/js/main.js @@ -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; }, diff --git a/staticfiles/static/js/map.js b/staticfiles/static/js/map.js index 7982c75..e7b351d 100644 --- a/staticfiles/static/js/map.js +++ b/staticfiles/static/js/map.js @@ -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; },