diff --git a/lib/core/dispatchRequest.js b/lib/core/dispatchRequest.js index f063497..54db2e7 100644 --- a/lib/core/dispatchRequest.js +++ b/lib/core/dispatchRequest.js @@ -11,7 +11,7 @@ module.exports = function dispatchRequest(config) { return new Promise(function (resolve, reject) { try { // For browsers use XHR adapter - if (typeof window !== 'undefined') { + if (typeof XMLHttpRequest !== 'undefined') { require('../adapters/xhr')(resolve, reject, config); } // For node use HTTP adapter