Sort domains alphabetically

When using domains.push, domains are listed in reverse alphabetically order. I assume that using domain.unshift should make the domain list alphabetically sorted
This commit is contained in:
cyxae 2019-12-06 18:51:17 +01:00 committed by GitHub
parent 95f8503e6d
commit 729178a1a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@
c.api('PUT', '/domains/main', {}, function(data2) {
var domains = [];
$.each(data.domains, function(k, domain) {
domains.push({
domains.unshift({
url: domain,
main: (domain == data2.current_main_domain) ? true : false
});