(fiber: Fiber)
| 6391 | } |
| 6392 | |
| 6393 | function isErrorBoundary(fiber: Fiber): boolean { |
| 6394 | const {tag, type} = fiber; |
| 6395 | |
| 6396 | switch (tag) { |
| 6397 | case ClassComponent: |
| 6398 | case IncompleteClassComponent: |
| 6399 | const instance = fiber.stateNode; |
| 6400 | return ( |
| 6401 | typeof type.getDerivedStateFromError === 'function' || |
| 6402 | (instance !== null && |
| 6403 | typeof instance.componentDidCatch === 'function') |
| 6404 | ); |
| 6405 | default: |
| 6406 | return false; |
| 6407 | } |
| 6408 | } |
| 6409 | |
| 6410 | function inspectElementRaw(id: number): InspectedElement | null { |
| 6411 | const devtoolsInstance = idToDevToolsInstanceMap.get(id); |
no outgoing calls
no test coverage detected