Handle undefined values provided for autocomplete

This commit is contained in:
Piotr Jamróz
2021-08-09 14:48:09 +02:00
parent a631392c6c
commit 0a26cbf36c
@@ -33,8 +33,8 @@ export function TagsSection({ dispatch, tags, state, addTagSegments }: Props) {
// Options are reloaded while user is typing with backend taking care of auto-complete (auto-complete cannot be
// implemented in front-end because backend returns only limited number of entries)
const getTagsAsSegmentsOptions = useCallback(
(inputValue: string) => {
return getTagsAsSegmentsSelectables(state, inputValue);
(inputValue?: string) => {
return getTagsAsSegmentsSelectables(state, inputValue || '');
},
[state]
);