mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Merge pull request #234 from samueleaton/master
switches check order of xhr/http for electron
This commit is contained in:
@@ -15,12 +15,12 @@ module.exports = function dispatchRequest(config) {
|
|||||||
if (typeof config.adapter === 'function') {
|
if (typeof config.adapter === 'function') {
|
||||||
// For custom adapter support
|
// For custom adapter support
|
||||||
adapter = config.adapter;
|
adapter = config.adapter;
|
||||||
} else if (typeof XMLHttpRequest !== 'undefined') {
|
|
||||||
// For browsers use XHR adapter
|
|
||||||
adapter = require('../adapters/xhr');
|
|
||||||
} else if (typeof process !== 'undefined') {
|
} else if (typeof process !== 'undefined') {
|
||||||
// For node use HTTP adapter
|
// For node use HTTP adapter
|
||||||
adapter = require('../adapters/http');
|
adapter = require('../adapters/http');
|
||||||
|
} else if (typeof XMLHttpRequest !== 'undefined') {
|
||||||
|
// For browsers use XHR adapter
|
||||||
|
adapter = require('../adapters/xhr');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof adapter === 'function') {
|
if (typeof adapter === 'function') {
|
||||||
|
|||||||
Reference in New Issue
Block a user