From 193f1cee63230be6c62075819b7a22d7bf1bd738 Mon Sep 17 00:00:00 2001 From: Quinton Pike Date: Thu, 4 Jun 2015 11:40:50 -0400 Subject: [PATCH] allows optional paramFunc --- dist/jquery.autocomplete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/jquery.autocomplete.js b/dist/jquery.autocomplete.js index 96503066..929ce836 100644 --- a/dist/jquery.autocomplete.js +++ b/dist/jquery.autocomplete.js @@ -531,6 +531,7 @@ that = this, options = that.options, serviceUrl = options.serviceUrl, + paramFunc = options.paramFunc || $.param, params, cacheKey, ajaxSettings; @@ -557,7 +558,7 @@ if ($.isFunction(serviceUrl)) { serviceUrl = serviceUrl.call(that.element, q); } - cacheKey = serviceUrl + '?' + $.param(params || {}); + cacheKey = serviceUrl + '?' + paramFunc(params || {}); response = that.cachedResponse[cacheKey]; }