Fix floating promises in ts files

This commit is contained in:
Bill Thornton 2023-05-02 11:24:53 -04:00
parent aaac4883e3
commit eedd40159c
25 changed files with 250 additions and 47 deletions

View file

@ -45,7 +45,11 @@ const SearchSuggestions: FunctionComponent<SearchSuggestionsProps> = ({ parentId
parentId: parentId || undefined,
enableTotalRecordCount: false
})
.then(result => setSuggestions(result.data.Items || []));
.then(result => setSuggestions(result.data.Items || []))
.catch(err => {
console.error('[SearchSuggestions] failed to fetch search suggestions', err);
setSuggestions([]);
});
}
}, [ api, parentId, user ]);