mirror of
https://github.com/devbridge/jQuery-Autocomplete.git
synced 2024-11-26 06:46:32 +00:00
Rename variable to avoid shadowing variable in the other scope.
This commit is contained in:
parent
e5bbc205df
commit
0ee2ba58dc
@ -474,11 +474,11 @@
|
|||||||
that = this,
|
that = this,
|
||||||
options = that.options,
|
options = that.options,
|
||||||
serviceUrl = options.serviceUrl,
|
serviceUrl = options.serviceUrl,
|
||||||
data,
|
params,
|
||||||
cacheKey;
|
cacheKey;
|
||||||
|
|
||||||
options.params[options.paramName] = q;
|
options.params[options.paramName] = q;
|
||||||
data = options.ignoreParams ? null : options.params;
|
params = options.ignoreParams ? null : options.params;
|
||||||
|
|
||||||
if (that.isLocal) {
|
if (that.isLocal) {
|
||||||
response = that.getSuggestionsLocal(q);
|
response = that.getSuggestionsLocal(q);
|
||||||
@ -486,7 +486,7 @@
|
|||||||
if ($.isFunction(serviceUrl)) {
|
if ($.isFunction(serviceUrl)) {
|
||||||
serviceUrl = serviceUrl.call(that.element, q);
|
serviceUrl = serviceUrl.call(that.element, q);
|
||||||
}
|
}
|
||||||
cacheKey = serviceUrl + '?' + $.param(data || {});
|
cacheKey = serviceUrl + '?' + $.param(params || {});
|
||||||
response = that.cachedResponse[cacheKey];
|
response = that.cachedResponse[cacheKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -502,7 +502,7 @@
|
|||||||
}
|
}
|
||||||
that.currentRequest = $.ajax({
|
that.currentRequest = $.ajax({
|
||||||
url: serviceUrl,
|
url: serviceUrl,
|
||||||
data: data,
|
data: params,
|
||||||
type: options.type,
|
type: options.type,
|
||||||
dataType: options.dataType
|
dataType: options.dataType
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user