mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-24 02:38:58 +00:00
Co-authored-by: Mikael Finstad <finstaden@gmail.com> Co-authored-by: Nick Rutten <2504906+nickrttn@users.noreply.github.com> Co-authored-by: Murderlon <merlijn@soverin.net> Co-authored-by: Artur Paikin <artur@arturpaikin.com>
8 lines
201 B
TypeScript
8 lines
201 B
TypeScript
function isNetworkError(xhr?: XMLHttpRequest): boolean {
|
|
if (!xhr) {
|
|
return false
|
|
}
|
|
return (xhr.readyState !== 0 && xhr.readyState !== 4) || xhr.status === 0
|
|
}
|
|
|
|
export default isNetworkError
|