Skip to content

Commit

Permalink
Merge pull request #85 from tomaash/patch-1
Browse files Browse the repository at this point in the history
In browsers check for XMLHttpRequest, not window
  • Loading branch information
mzabriskie committed Jul 23, 2015
2 parents 183e592 + 72fc02f commit 63ac064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/dispatchRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') || (typeof ActiveXObject !== 'undefined')) {
require('../adapters/xhr')(resolve, reject, config);
}
// For node use HTTP adapter
Expand Down

0 comments on commit 63ac064

Please sign in to comment.