mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-25 14:17:45 +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:
|
||||
if (!options.noCache) {
|
||||
that.cachedResponse[cacheKey] = result;
|
||||
if (options.preventBadQueries && !result.suggestions.length) {
|
||||
if (options.preventBadQueries && !result.suggestions.length && originalQuery) {
|
||||
that.badQueries.push(originalQuery);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user