(fiber)
| 12503 | } |
| 12504 | |
| 12505 | function findCurrentUnmaskedContext(fiber) { |
| 12506 | // Currently this is only used with renderSubtreeIntoContainer; not sure if it |
| 12507 | // makes sense elsewhere |
| 12508 | !(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; |
| 12509 | |
| 12510 | var node = fiber; |
| 12511 | while (node.tag !== HostRoot) { |
| 12512 | if (isContextProvider(node)) { |
| 12513 | return node.stateNode.__reactInternalMemoizedMergedChildContext; |
| 12514 | } |
| 12515 | var parent = node['return']; |
| 12516 | !parent ? invariant(false, 'Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.') : void 0; |
| 12517 | node = parent; |
| 12518 | } |
| 12519 | return node.stateNode.context; |
| 12520 | } |
| 12521 | |
| 12522 | return { |
| 12523 | getUnmaskedContext: getUnmaskedContext, |
no test coverage detected