提交 63ac064c 编写于 作者: M Matt Zabriskie

Merge pull request #85 from tomaash/patch-1

In browsers check for XMLHttpRequest, not window
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册