Skip to content

Commit

Permalink
Fix AJAX data source error
Browse files Browse the repository at this point in the history
Fixes select2#4355

Verified in Firefox & Chromium
  • Loading branch information
MichaelMackus committed May 11, 2016
1 parent 07aa8a4 commit e482efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/select2/data/ajax.js
Expand Up @@ -82,7 +82,7 @@ define([
}, function () {
// Attempt to detect if a request was aborted
// Only works if the transport exposes a status property
if ($request.status && $request.status === '0') {
if ('status' in $request && $request.status === 0) {

This comment has been minimized.

Copy link
@MaximeCn

MaximeCn Jan 23, 2018

For those who are using timeout : if ('status' in $request && $request.status === 0 && $request.statusText != "timeout")

return;
}

Expand Down

0 comments on commit e482efe

Please sign in to comment.