Skip to content

Commit

Permalink
Avoid setting withCredentials to null. Fixes #295. Fixes #279.
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeigarts committed Jan 3, 2013
1 parent b6dae4e commit b1c482f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/rails.js
Expand Up @@ -164,11 +164,17 @@
error: function(xhr, status, error) {
element.trigger('ajax:error', [xhr, status, error]);
},
xhrFields: {
withCredentials: withCredentials
},
crossDomain: crossDomain
};

// There is no withCredentials for IE6-8 when
// "Enable native XMLHTTP support" is disabled
if (withCredentials) {
options.xhrFields = {
withCredentials: withCredentials
};
}

// Only pass url to `ajax` options if not blank
if (url) { options.url = url; }

Expand Down

0 comments on commit b1c482f

Please sign in to comment.