Enable use of 'xhr' transport in Node.js #471

Merged
merged 1 commit into from Oct 4, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
View
@@ -190,7 +190,7 @@
var request = io.util.request(xdomain),
usesXDomReq = (global.XDomainRequest && request instanceof XDomainRequest),
socketProtocol = (socket && socket.options && socket.options.secure ? 'https:' : 'http:'),
- isXProtocol = (socketProtocol != global.location.protocol);
+ isXProtocol = (global.location && socketProtocol != global.location.protocol);
if (request && !(usesXDomReq && isXProtocol)) {
return true;
}