git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Updating the source version to 1.4.1pre.
[jquery.git]
/
src
/
ajax.js
diff --git
a/src/ajax.js
b/src/ajax.js
index
83e5bdc
..
3c199af
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-455,10
+455,11
@@
jQuery.extend({
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
try {
var oldAbort = xhr.abort;
xhr.abort = function() {
- oldAbort.call( xhr );
-
if ( xhr ) {
if ( xhr ) {
- xhr.readyState = 0;
+ oldAbort.call( xhr );
+ if ( xhr ) {
+ xhr.readyState = 0;
+ }
}
onreadystatechange();
}
onreadystatechange();
@@
-477,7
+478,7
@@
jQuery.extend({
// Send the data
try {
// Send the data
try {
- xhr.send( type === "POST" || type === "PUT" ? s.data : null );
+ xhr.send( type === "POST" || type === "PUT" || type === "DELETE" ? s.data : null );
} catch(e) {
jQuery.handleError(s, xhr, null, e);
// Fire the complete handlers
} catch(e) {
jQuery.handleError(s, xhr, null, e);
// Fire the complete handlers
@@
-664,7
+665,7
@@
jQuery.extend({
}
});
}
});
- } else if ( !traditional && typeof obj === "object" ) {
+ } else if ( !traditional && obj != null && typeof obj === "object" ) {
// Serialize object item.
jQuery.each( obj, function( k, v ) {
buildParams( prefix + "[" + k + "]", v );
// Serialize object item.
jQuery.each( obj, function( k, v ) {
buildParams( prefix + "[" + k + "]", v );