diff --git a/lib/transports/polling-xhr.js b/lib/transports/polling-xhr.js index deaf1615..27188c14 100644 --- a/lib/transports/polling-xhr.js +++ b/lib/transports/polling-xhr.js @@ -248,6 +248,9 @@ Request.prototype.onError = function(err){ */ Request.prototype.cleanup = function(){ + if ('undefined' == typeof this.xhr ) { + return; + } // xmlhttprequest this.xhr.onreadystatechange = empty;