up-for-grabs.net icon indicating copy to clipboard operation
up-for-grabs.net copied to clipboard

fixx #3628s

Open P-mistry opened this issue 1 year ago • 2 comments
trafficstars

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"

P-mistry avatar Nov 23 '23 17:11 P-mistry

: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.

shiftbot avatar Nov 23 '23 17:11 shiftbot

this.getLabels = function () { const labelsArray = Object.values(labelsMap);

P-mistry avatar Nov 23 '23 18:11 P-mistry