mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-22 12:55:12 +00:00
Fixed when empty query added as bad query
There was an issue when empty query was ran but no result given, the code did not even try to query result when empty search did not give results.
This commit is contained in:
parent
8138252b4c
commit
35d1299735
@ -819,7 +819,7 @@
|
|||||||
// Cache results if cache is not disabled:
|
// Cache results if cache is not disabled:
|
||||||
if (!options.noCache) {
|
if (!options.noCache) {
|
||||||
that.cachedResponse[cacheKey] = result;
|
that.cachedResponse[cacheKey] = result;
|
||||||
if (options.preventBadQueries && !result.suggestions.length) {
|
if (options.preventBadQueries && !result.suggestions.length && originalQuery) {
|
||||||
that.badQueries.push(originalQuery);
|
that.badQueries.push(originalQuery);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user