Browse Source

Check for string value

Michael Mackus 8 years ago
parent
commit
cd08d805a4
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/js/select2/data/ajax.js

+ 2 - 1
src/js/select2/data/ajax.js

@@ -82,7 +82,8 @@ define([
       }, function () {
       }, function () {
         // Attempt to detect if a request was aborted
         // Attempt to detect if a request was aborted
         // Only works if the transport exposes a status property
         // Only works if the transport exposes a status property
-        if ('status' in $request && $request.status === 0) {
+        if ('status' in $request &&
+            ($request.status === 0 || $request.status === '0')) {
           return;
           return;
         }
         }