Skip to content

Commit 634c174

Browse files
committed
Check for FormData support
1 parent d8fc0f8 commit 634c174

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)