Skip to content

Commit 4e92c8b

Browse files
committed
allow ajax.data to be undefined. fixes select2#732
1 parent 7d84093 commit 4e92c8b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ the specific language governing permissions and limitations under the Apache Lic
311311
traditional = options.traditional || false,
312312
type = options.type || 'GET'; // set type of request (GET or POST)
313313

314-
data = data.call(this, query.term, query.page, query.context);
314+
data = data ? data.call(this, query.term, query.page, query.context) : null;
315315

316316
if( null !== handler) { handler.abort(); }
317317

0 commit comments

Comments
 (0)