UNPKG

@uppy/utils

Version:

Shared utility functions for Uppy Core and plugins maintained by the Uppy team.

9 lines (7 loc) 201 B
function isNetworkError(xhr?: XMLHttpRequest): boolean { if (!xhr) { return false } return (xhr.readyState !== 0 && xhr.readyState !== 4) || xhr.status === 0 } export default isNetworkError