Skip to content

Commit 6e7dec1

Browse files
authored
Merge pull request #37 from canjs/formdata
Check for FormData support
2 parents d8fc0f8 + 634c174 commit 6e7dec1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

can-ajax.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ function ajax(o) {
208208
// see https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Simple_requests
209209

210210
var isSimpleCors = o.crossDomain && ['GET', 'POST', 'HEAD'].indexOf(type) !== -1;
211-
isFormData = o.data instanceof FormData;
211+
isFormData = typeof FormData !== "undefined" && o.data instanceof FormData;
212212

213213
if (isPost) {
214214
if (isFormData) {

0 commit comments

Comments
 (0)