(fiber)
| 4474 | var UNMOUNTED = 3; |
| 4475 | |
| 4476 | function isFiberMountedImpl(fiber) { |
| 4477 | var node = fiber; |
| 4478 | if (!fiber.alternate) { |
| 4479 | // If there is no alternate, this might be a new tree that isn't inserted |
| 4480 | // yet. If it is, then it will have a pending insertion effect on it. |
| 4481 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4482 | return MOUNTING; |
| 4483 | } |
| 4484 | while (node['return']) { |
| 4485 | node = node['return']; |
| 4486 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4487 | return MOUNTING; |
| 4488 | } |
| 4489 | } |
| 4490 | } else { |
| 4491 | while (node['return']) { |
| 4492 | node = node['return']; |
| 4493 | } |
| 4494 | } |
| 4495 | if (node.tag === HostRoot) { |
| 4496 | // TODO: Check if this was a nested HostRoot when used with |
| 4497 | // renderContainerIntoSubtree. |
| 4498 | return MOUNTED; |
| 4499 | } |
| 4500 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 4501 | // that has been unmounted. |
| 4502 | return UNMOUNTED; |
| 4503 | } |
| 4504 | |
| 4505 | function isFiberMounted(fiber) { |
| 4506 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected