(fiber)
| 12468 | } |
| 12469 | |
| 12470 | function findCurrentUnmaskedContext(fiber) { |
| 12471 | // Currently this is only used with renderSubtreeIntoContainer; not sure if it |
| 12472 | // makes sense elsewhere |
| 12473 | !(isFiberMounted(fiber) && fiber.tag === ClassComponent) ? invariant(false, 'Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.') : void 0; |
| 12474 | |
| 12475 | var node = fiber; |
| 12476 | while (node.tag !== HostRoot) { |
| 12477 | if (isContextProvider(node)) { |
| 12478 | return node.stateNode.__reactInternalMemoizedMergedChildContext; |
| 12479 | } |
| 12480 | var parent = node['return']; |
| 12481 | !parent ? invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.') : void 0; |
| 12482 | node = parent; |
| 12483 | } |
| 12484 | return node.stateNode.context; |
| 12485 | } |
| 12486 | |
| 12487 | return { |
| 12488 | getUnmaskedContext: getUnmaskedContext, |
no test coverage detected