From cde543eb3ca2a4fb37153d06826abd0a620733ed Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 5 Dec 2024 13:18:56 -0500 Subject: [PATCH] Refactored Region sort function in FieldToLabelMap --- frontend/src/pages/Search/FilterTags.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/pages/Search/FilterTags.tsx b/frontend/src/pages/Search/FilterTags.tsx index 11c1f06f..ee326156 100644 --- a/frontend/src/pages/Search/FilterTags.tsx +++ b/frontend/src/pages/Search/FilterTags.tsx @@ -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;