MCPcopy Create free account
hub / github.com/danielstocks/react-sortable / isFailedBoundary

Function isFailedBoundary

bundle.js:7910–7912  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

7908firstUncaughtError=error;}return null;}function hasCapturedError(fiber){// TODO: capturedErrors should store the boundary instance, to avoid needing
7909// to check the alternate.
7910return capturedErrors!==null&&(capturedErrors.has(fiber)||fiber.alternate!==null&&capturedErrors.has(fiber.alternate));}function isFailedBoundary(fiber){// TODO: failedBoundaries should store the boundary instance, to avoid
7911// needing to check the alternate.
7912return failedBoundaries!==null&&(failedBoundaries.has(fiber)||fiber.alternate!==null&&failedBoundaries.has(fiber.alternate));}function commitErrorHandling(effectfulFiber){var capturedError=void 0;if(capturedErrors!==null){capturedError=capturedErrors.get(effectfulFiber);capturedErrors['delete'](effectfulFiber);if(capturedError==null){if(effectfulFiber.alternate!==null){effectfulFiber=effectfulFiber.alternate;capturedError=capturedErrors.get(effectfulFiber);capturedErrors['delete'](effectfulFiber);}}}!(capturedError!=null)?invariant(false,'No error for given unit of work. This error is likely caused by a bug in React. Please file an issue.'):void 0;switch(effectfulFiber.tag){case ClassComponent$5:var instance=effectfulFiber.stateNode;var info={componentStack:capturedError.componentStack};// Allow the boundary to handle the error, usually by scheduling
7913// an update to itself
7914instance.componentDidCatch(capturedError.error,info);return;case HostRoot$6:if(firstUncaughtError===null){// If this is the host container, we treat it as a no-op error
7915// boundary. We'll throw the first uncaught error once it's safe to

Callers 1

captureErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected