Skip to content

Commit

Permalink
Refactored Region sort function in FieldToLabelMap
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkishpolicy committed Dec 5, 2024
1 parent e64b5b0 commit cde543e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions frontend/src/pages/Search/FilterTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@ const FIELD_TO_LABEL_MAP: FieldToLabelMap = {
},
filterValueAccssor: (t) => {
if (Array.isArray(t)) {
return t.sort((a: any, b: any) => {
const aValue = typeof a === 'string' ? a : String(a);
const bValue = typeof b === 'string' ? b : String(b);
return aValue.localeCompare(bValue);
return t.sort((a: string, b: string) => {
return a.localeCompare(b);
});
}
return t;
Expand Down

0 comments on commit cde543e

Please sign in to comment.