Skip to content

Commit 0ee2ba5

Browse files
author
Tomas Kirda
committed
Rename variable to avoid shadowing variable in the other scope.
1 parent e5bbc20 commit 0ee2ba5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/jquery.autocomplete.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -474,19 +474,19 @@
474474
that = this,
475475
options = that.options,
476476
serviceUrl = options.serviceUrl,
477-
data,
477+
params,
478478
cacheKey;
479479

480480
options.params[options.paramName] = q;
481-
data = options.ignoreParams ? null : options.params;
481+
params = options.ignoreParams ? null : options.params;
482482

483483
if (that.isLocal) {
484484
response = that.getSuggestionsLocal(q);
485485
} else {
486486
if ($.isFunction(serviceUrl)) {
487487
serviceUrl = serviceUrl.call(that.element, q);
488488
}
489-
cacheKey = serviceUrl + '?' + $.param(data || {});
489+
cacheKey = serviceUrl + '?' + $.param(params || {});
490490
response = that.cachedResponse[cacheKey];
491491
}
492492

@@ -502,7 +502,7 @@
502502
}
503503
that.currentRequest = $.ajax({
504504
url: serviceUrl,
505-
data: data,
505+
data: params,
506506
type: options.type,
507507
dataType: options.dataType
508508
}).done(function (data) {

0 commit comments

Comments
 (0)