diff --git a/site/gatsby-site/src/components/discover/SORTING_LISTS.js b/site/gatsby-site/src/components/discover/SORTING_LISTS.js index 0ab8b2ee1f..e86004db74 100644 --- a/site/gatsby-site/src/components/discover/SORTING_LISTS.js +++ b/site/gatsby-site/src/components/discover/SORTING_LISTS.js @@ -63,9 +63,7 @@ const BASE_SORTING_LIST = [ }, ]; -const SORTING_LIST = []; - -BASE_SORTING_LIST.forEach((item) => { +const SORTING_LIST = BASE_SORTING_LIST.map((item) => { const newItem = { ...item, value: `instant_search-en${item.instantKey == 'featured' ? '-' : '_'}${item.instantKey}`, @@ -80,7 +78,7 @@ BASE_SORTING_LIST.forEach((item) => { // remove auxiliary field delete newItem.instantKey; - SORTING_LIST.push(newItem); + return newItem; }); export default SORTING_LIST;