diff --git a/lib/transports/polling-xhr.js b/lib/transports/polling-xhr.js index ef08b7ed0..04da6d721 100755 --- a/lib/transports/polling-xhr.js +++ b/lib/transports/polling-xhr.js @@ -257,7 +257,7 @@ Request.prototype.create = function () { // make sure the `error` event handler that's user-set // does not throw in the same tick and gets caught here setTimeout(function () { - self.onError(xhr.status); + self.onError(typeof xhr.status === 'number' ? xhr.status : 0); }, 0); } };