Don't autocomplete for empty string search
This commit is contained in:
parent
7f8d084fa4
commit
72187ca51e
1 changed files with 2 additions and 0 deletions
|
@ -72,6 +72,8 @@ export const doUpdateSearchQuery = (query: string, shouldSkipSuggestions: ?boole
|
|||
data: { query },
|
||||
});
|
||||
|
||||
if (!query) return;
|
||||
|
||||
// Don't fetch new suggestions if the user just added a space
|
||||
if (!query.endsWith(' ') || !shouldSkipSuggestions) {
|
||||
throttledSearchSuggestions(dispatch, query);
|
||||
|
|
Loading…
Reference in a new issue