Bug 8107; Fix argument handling for $.ajax for multiple method signatues and add...
[jquery.git] / src / ajax.js
index c7d7f2d..3158ca4 100644 (file)
@@ -322,9 +322,8 @@ jQuery.extend({
        // Main method
        ajax: function( url, options ) {
 
-               // If options is not an object,
-               // we simulate pre-1.5 signature
-               if ( typeof options !== "object" ) {
+               // If url is an object, simulate pre-1.5 signature
+               if ( typeof url === "object" ) {
                        options = url;
                        url = undefined;
                }