Skip to content

Commit

Permalink
bugfix Android 2.3.x 无法设置xhrFields
Browse files Browse the repository at this point in the history
  • Loading branch information
applezqp committed Feb 26, 2014
1 parent 7e7e10b commit 3a0499b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,11 @@
return xhr
}

if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]

var async = 'async' in settings ? settings.async : true
xhr.open(settings.type, settings.url, async, settings.username, settings.password)

if (settings.xhrFields) for (name in settings.xhrFields) xhr[name] = settings.xhrFields[name]

for (name in headers) nativeSetHeader.apply(xhr, headers[name])

if (settings.timeout > 0) abortTimeout = setTimeout(function(){
Expand Down

0 comments on commit 3a0499b

Please sign in to comment.