2
0
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:
Matt Zabriskie
2015-12-14 20:06:57 -07:00
parent 2b147fb0b7
commit f28a4a8248
16 changed files with 230 additions and 93 deletions
+4 -5
View File
@@ -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) {