UNPKG

@uppy/utils

Version:

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

8 lines (7 loc) 233 B
function isNetworkError(xhr) { if (!xhr) return false; // finished but status is 0 — usually indicates a network/CORS/file error return xhr.readyState === 4 && xhr.status === 0; } export default isNetworkError;