This repository was archived by the owner on Jul 13, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix confusing error when XHR statusText is blank
In the existing `Error(xhr.statusText + ': ' + url || 'XHR error')` implementation, the LHS of the OR is always truthy, so XHR failures with no statusText yield error messages like `: google.com`. This edit changes that to a slightly-less-cryptic `XHR error: status 0 "": http://google.com` (which yields useful results in a web search), or if there is a statusText, `XHR error: status 403 "Forbidden": http://mydomain.com/page`. (Feel free to just change it directly in the codebase instead of merging if you prefer different formatting, etc.)
- Loading branch information