Skip to content

Commit fd7fff2

Browse files
christopher-kissdarrachequesne
authored andcommitted
[fix] Ensure valid status is passed to error handler (#622)
Closes #621
1 parent 2266269 commit fd7fff2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/transports/polling-xhr.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ Request.prototype.create = function () {
257257
// make sure the `error` event handler that's user-set
258258
// does not throw in the same tick and gets caught here
259259
setTimeout(function () {
260-
self.onError(xhr.status);
260+
self.onError(typeof xhr.status === 'number' ? xhr.status : 0);
261261
}, 0);
262262
}
263263
};

0 commit comments

Comments
 (0)