diff --git a/lib/adapters/xhr.js b/lib/adapters/xhr.js index f5c397c..2ae64e5 100644 --- a/lib/adapters/xhr.js +++ b/lib/adapters/xhr.js @@ -137,7 +137,9 @@ module.exports = function xhrAdapter(config) { try { request.responseType = config.responseType; } catch (e) { - if (request.responseType !== 'json') { + // Expectes DOMException thrown by browsers not compatible XMLHttpRequest Level 2. + // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function. + if (config.responseType !== 'json') { throw e; } }