Skip to content

Commit ac12f72

Browse files
committed
Merge pull request #281 from 3rd-Eden/master
[fix] new XMLHttpRequest always returns an object
2 parents ee17598 + d4afe6c commit ac12f72

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/transports/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/**
32
* Module dependencies
43
*/
@@ -43,7 +42,7 @@ function polling (opts) {
4342
opts.xdomain = xd;
4443
xhr = new XMLHttpRequest(opts);
4544

46-
if (xhr && !opts.forceJSONP) {
45+
if ('open' in xhr && !opts.forceJSONP) {
4746
return new XHR(opts);
4847
} else {
4948
return new JSONP(opts);

0 commit comments

Comments
 (0)