Browse Source

allow ajax.data to be undefined. fixes #732

Igor Vaynberg 12 years ago
parent
commit
4e92c8b1b4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      select2.js

+ 1 - 1
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(); }