mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-22 12:55:12 +00:00
migrate dprecated $.isArray
to Array.isArray
`$.isArray` is deprecated in jQuery 3.2, so Array.isArray should be the way to go. https://github.com/jquery/jquery/issues/2961 https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/
This commit is contained in:
parent
59a1293774
commit
5b3da47ca6
@ -252,7 +252,7 @@
|
|||||||
|
|
||||||
this.options = $.extend({}, options, suppliedOptions);
|
this.options = $.extend({}, options, suppliedOptions);
|
||||||
|
|
||||||
that.isLocal = $.isArray(options.lookup);
|
that.isLocal = Array.isArray(options.lookup);
|
||||||
|
|
||||||
if (that.isLocal) {
|
if (that.isLocal) {
|
||||||
options.lookup = that.verifySuggestionsFormat(options.lookup);
|
options.lookup = that.verifySuggestionsFormat(options.lookup);
|
||||||
@ -558,7 +558,7 @@
|
|||||||
response = that.cachedResponse[cacheKey];
|
response = that.cachedResponse[cacheKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response && $.isArray(response.suggestions)) {
|
if (response && Array.isArray(response.suggestions)) {
|
||||||
that.suggestions = response.suggestions;
|
that.suggestions = response.suggestions;
|
||||||
that.suggest();
|
that.suggest();
|
||||||
options.onSearchComplete.call(that.element, q, response.suggestions);
|
options.onSearchComplete.call(that.element, q, response.suggestions);
|
||||||
|
Loading…
Reference in New Issue
Block a user