(fiber)
| 4437 | var UNMOUNTED = 3; |
| 4438 | |
| 4439 | function isFiberMountedImpl(fiber) { |
| 4440 | var node = fiber; |
| 4441 | if (!fiber.alternate) { |
| 4442 | // If there is no alternate, this might be a new tree that isn't inserted |
| 4443 | // yet. If it is, then it will have a pending insertion effect on it. |
| 4444 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4445 | return MOUNTING; |
| 4446 | } |
| 4447 | while (node['return']) { |
| 4448 | node = node['return']; |
| 4449 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4450 | return MOUNTING; |
| 4451 | } |
| 4452 | } |
| 4453 | } else { |
| 4454 | while (node['return']) { |
| 4455 | node = node['return']; |
| 4456 | } |
| 4457 | } |
| 4458 | if (node.tag === HostRoot) { |
| 4459 | // TODO: Check if this was a nested HostRoot when used with |
| 4460 | // renderContainerIntoSubtree. |
| 4461 | return MOUNTED; |
| 4462 | } |
| 4463 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 4464 | // that has been unmounted. |
| 4465 | return UNMOUNTED; |
| 4466 | } |
| 4467 | |
| 4468 | function isFiberMounted(fiber) { |
| 4469 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected