Skip to content

Commit

Permalink
[fix] Ensure valid status is passed to error handler (#622)
Browse files Browse the repository at this point in the history
Closes #621
  • Loading branch information
christopher-kiss authored and darrachequesne committed Sep 13, 2019
1 parent 2266269 commit fd7fff2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/transports/polling-xhr.js
Expand Up @@ -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);
}
};
Expand Down

0 comments on commit fd7fff2

Please sign in to comment.