mirror of
https://github.com/tenrok/axios.git
synced 2026-05-27 14:47:43 +03:00
Using more strict eslint rules
This commit is contained in:
@@ -8,14 +8,13 @@
|
||||
* @returns {Promise} The Promise to be fulfilled
|
||||
*/
|
||||
module.exports = function dispatchRequest(config) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
return new Promise(function executor(resolve, reject) {
|
||||
try {
|
||||
// For browsers use XHR adapter
|
||||
if ((typeof XMLHttpRequest !== 'undefined') || (typeof ActiveXObject !== 'undefined')) {
|
||||
// For browsers use XHR adapter
|
||||
require('../adapters/xhr')(resolve, reject, config);
|
||||
}
|
||||
// For node use HTTP adapter
|
||||
else if (typeof process !== 'undefined') {
|
||||
} else if (typeof process !== 'undefined') {
|
||||
// For node use HTTP adapter
|
||||
require('../adapters/http')(resolve, reject, config);
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user