ソースを参照

fix #1977: Cancel previous xhr request

zhixin 9 年 前
コミット
f59677a6fa
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -1978,7 +1978,7 @@
         if (this.options.ajax) {
             calculateObjectValue(this, this.options.ajax, [request], null);
         } else {
-            if(this._xhr) {
+            if (this._xhr && this._xhr.readyState !== 4) {
                 this._xhr.abort();
             }
             this._xhr = $.ajax(request);