mirror of
https://github.com/tenrok/axios.git
synced 2026-06-02 16:04:10 +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') {
|
||||
// For custom adapter support
|
||||
adapter = config.adapter;
|
||||
} else if (typeof XMLHttpRequest !== 'undefined') {
|
||||
// For browsers use XHR adapter
|
||||
adapter = require('../adapters/xhr');
|
||||
} else if (typeof process !== 'undefined') {
|
||||
// For node use HTTP adapter
|
||||
adapter = require('../adapters/http');
|
||||
} else if (typeof XMLHttpRequest !== 'undefined') {
|
||||
// For browsers use XHR adapter
|
||||
adapter = require('../adapters/xhr');
|
||||
}
|
||||
|
||||
if (typeof adapter === 'function') {
|
||||
|
||||
Reference in New Issue
Block a user