From 4e92c8b1b41f6c2171f58a686a125127065aec8f Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Wed, 23 Jan 2013 09:24:23 -0800 Subject: [PATCH] allow ajax.data to be undefined. fixes #732 --- select2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/select2.js b/select2.js index 0ec9599a..958d0f5d 100644 --- a/select2.js +++ b/select2.js @@ -311,7 +311,7 @@ the specific language governing permissions and limitations under the Apache Lic traditional = options.traditional || false, type = options.type || 'GET'; // set type of request (GET or POST) - data = data.call(this, query.term, query.page, query.context); + data = data ? data.call(this, query.term, query.page, query.context) : null; if( null !== handler) { handler.abort(); }