up-for-grabs.net
up-for-grabs.net copied to clipboard
fixx #3628s
this.getLabels = function () { const labelsArray = Object.values(labelsMap);
// Sort labels based on whether they start with a letter or not const sortedLabels = labelsArray.sort((a, b) => { const aIsLetter = /^[a-zA-Z]/.test(a.name); const bIsLetter = /^[a-zA-Z]/.test(b.name);
if (aIsLetter && !bIsLetter) {
return -1; // a comes first
} else if (!aIsLetter && bIsLetter) {
return 1; // b comes first
} else {
return a.name.localeCompare(b.name); // default alphabetical sorting
}
});
return sortedLabels; };
"modify changes"
:wave: I'm a robot checking the state of this pull request to save the human reviewers time. I don't see any changes under _data/projects/ so I don't have any feedback here.
As you make changes to this pull request, I'll re-run these checks.
this.getLabels = function () { const labelsArray = Object.values(labelsMap);