2
0
mirror of https://github.com/devbridge/jQuery-Autocomplete.git synced 2024-11-22 12:55:12 +00:00

Rename variable to avoid shadowing variable in the other scope.

This commit is contained in:
Tomas Kirda 2013-11-24 20:12:35 -06:00
parent e5bbc205df
commit 0ee2ba58dc

View File

@ -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) {