Commit 64ce480
authored
fix: use try/catch when setting xhr.responseType (#592)
Some XHR implementations (like Firefox WebWorker, react-native and some Android 4.x versions) throw
an exception when setting xhr.responseType = 'arraybuffer' when xhr.readyState === 2 (which is
perfectly valid, spec-wise).
That commit fixes that behaviour by reverting some of the changes from
#562 for those implementations.
Fixes #589
Closes #5901 parent 3039017 commit 64ce480
1 file changed
+13
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
223 | 227 | | |
224 | 228 | | |
225 | 229 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
242 | | - | |
243 | 246 | | |
244 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
245 | 251 | | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
| |||
355 | 358 | | |
356 | 359 | | |
357 | 360 | | |
358 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
359 | 366 | | |
360 | 367 | | |
361 | 368 | | |
| |||
0 commit comments