(fiber)
| 4346 | var UNMOUNTED = 3; |
| 4347 | |
| 4348 | function isFiberMountedImpl(fiber) { |
| 4349 | var node = fiber; |
| 4350 | if (!fiber.alternate) { |
| 4351 | // If there is no alternate, this might be a new tree that isn't inserted |
| 4352 | // yet. If it is, then it will have a pending insertion effect on it. |
| 4353 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4354 | return MOUNTING; |
| 4355 | } |
| 4356 | while (node['return']) { |
| 4357 | node = node['return']; |
| 4358 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4359 | return MOUNTING; |
| 4360 | } |
| 4361 | } |
| 4362 | } else { |
| 4363 | while (node['return']) { |
| 4364 | node = node['return']; |
| 4365 | } |
| 4366 | } |
| 4367 | if (node.tag === HostRoot) { |
| 4368 | // TODO: Check if this was a nested HostRoot when used with |
| 4369 | // renderContainerIntoSubtree. |
| 4370 | return MOUNTED; |
| 4371 | } |
| 4372 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 4373 | // that has been unmounted. |
| 4374 | return UNMOUNTED; |
| 4375 | } |
| 4376 | |
| 4377 | function isFiberMounted(fiber) { |
| 4378 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected