Browse Source

Update data.

zhixin 11 years ago
parent
commit
d58e7c1ab0
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/bootstrap-table.js

+ 2 - 1
src/bootstrap-table.js

@@ -1217,7 +1217,8 @@
         $.ajax($.extend({}, calculateObjectValue(null, this.options.ajaxOptions), {
             type: this.options.method,
             url: this.options.url,
-            data: ("application/json" == this.options.contentType && this.options.method == "post") ? JSON.stringify(data): data,
+            data: this.options.contentType === 'application/json' && this.options.method === 'post' ?
+                JSON.stringify(data): data,
             cache: this.options.cache,
             contentType: this.options.contentType,
             dataType: this.options.dataType,