Minor code adjustments

Minor code adjustments
This commit is contained in:
Alezia Kurdis 2020-05-20 16:11:48 -04:00 committed by GitHub
parent 3a0c4e1477
commit 3023924cf1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2905,11 +2905,13 @@ function getExistingZoneList() {
}; };
listExistingZones.push(thisZone); listExistingZones.push(thisZone);
} }
listExistingZones.sort(GetSortOrder("name")); var zoneSortProperty = "name";
var zoneSortOrder = getSortOrder(zoneSortProperty);
listExistingZones.sort(zoneSortOrder);
return listExistingZones; return listExistingZones;
} }
function GetSortOrder(sortProperty) { function getSortOrder(sortProperty) {
return function(a, b) { return function(a, b) {
if (a[sortProperty] > b[sortProperty]) { if (a[sortProperty] > b[sortProperty]) {
return 1; return 1;