If your url address does not start with http:// or https://.. For example my url was //
server.com. The expected server status is 0, becouse of this check:
xhr.expected = (protocol === 'http:' || protocol === 'https:') ? 200 : 0;
If you replace
if (xhr.status === xhr.expected) {
with:
if (xhr.status === 200) {
you will solve your problem. :)