|
@@ -211,8 +211,9 @@ module.exports = class MiniXHRUpload {
|
|
|
|
|
|
xhr.open(opts.method.toUpperCase(), opts.endpoint, true)
|
|
|
// IE10 does not allow setting `withCredentials` and `responseType`
|
|
|
- // before `open()` is called.
|
|
|
- xhr.withCredentials = opts.withCredentials
|
|
|
+ // before `open()` is called. It’s important to set withCredentials
|
|
|
+ // to a boolean, otherwise React Native crashes
|
|
|
+ xhr.withCredentials = Boolean(opts.withCredentials)
|
|
|
if (opts.responseType !== '') {
|
|
|
xhr.responseType = opts.responseType
|
|
|
}
|