ソースを参照

Merge pull request #4657 from wenzhixin/fix/ajax-error

Fixed jqXHR undefined error using custom ajax
Dustin Utecht 6 年 前
コミット
1b4870d2f8
1 ファイル変更2 行追加2 行削除
  1. 2 2
      src/bootstrap-table.js

+ 2 - 2
src/bootstrap-table.js

@@ -1638,7 +1638,7 @@ class BootstrapTable {
           this.options.responseHandler, [_res, jqXHR], _res)
 
         this.load(res)
-        this.trigger('load-success', res, jqXHR.status, jqXHR)
+        this.trigger('load-success', res, jqXHR && jqXHR.status, jqXHR)
         if (!silent) {
           this.hideLoading()
         }
@@ -1651,7 +1651,7 @@ class BootstrapTable {
           data[this.options.dataField] = []
         }
         this.load(data)
-        this.trigger('load-error', jqXHR.status, jqXHR)
+        this.trigger('load-error', jqXHR && jqXHR.status, jqXHR)
         if (!silent) this.$tableLoading.hide()
       }
     })