Skip to content

Commit 4c7061b

Browse files
authored
Merge pull request #57060 from Expensify/francois-fix-crash-category-no-name
Safely filter out categories without a name in `SearchMultipleSelectionPicker`
2 parents 68b813c + 7baa42c commit 4c7061b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Search/SearchMultipleSelectionPicker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function SearchMultipleSelectionPicker({items, initiallySelectedItems, pickerTit
5757
value: item.value,
5858
}));
5959
const remainingItemsSection = items
60-
.filter((item) => selectedItems.some((selectedItem) => selectedItem.value === item.value) === false && item?.name.toLowerCase().includes(debouncedSearchTerm?.toLowerCase()))
60+
.filter((item) => selectedItems.some((selectedItem) => selectedItem.value === item.value) === false && item?.name?.toLowerCase().includes(debouncedSearchTerm?.toLowerCase()))
6161
.sort((a, b) => sortOptionsWithEmptyValue(a, b))
6262
.map((item) => ({
6363
text: item.name,

0 commit comments

Comments
 (0)