Skip to content

Commit

Permalink
fix issue with items being null
Browse files Browse the repository at this point in the history
  • Loading branch information
devcshort committed Oct 31, 2023
1 parent 48625bf commit eaed85b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ export function TaxonomyAutocomplete({
}
filter={(value, item) => {
if (isTaxonomyCode.test(value)) {
return item.term.toLowerCase().startsWith(value.toLowerCase());
return item?.term?.toLowerCase()?.startsWith(value.toLowerCase());
} else {
return item.value.toLowerCase().includes(value.toLowerCase());
return item?.value?.toLowerCase()?.includes(value.toLowerCase());
}
}}
data={computedSuggestions}
Expand Down

0 comments on commit eaed85b

Please sign in to comment.