(fiber)
| 5364 | var UNMOUNTED = 3; |
| 5365 | |
| 5366 | function isFiberMountedImpl(fiber) { |
| 5367 | var node = fiber; |
| 5368 | if (!fiber.alternate) { |
| 5369 | // If there is no alternate, this might be a new tree that isn't inserted |
| 5370 | // yet. If it is, then it will have a pending insertion effect on it. |
| 5371 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5372 | return MOUNTING; |
| 5373 | } |
| 5374 | while (node['return']) { |
| 5375 | node = node['return']; |
| 5376 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5377 | return MOUNTING; |
| 5378 | } |
| 5379 | } |
| 5380 | } else { |
| 5381 | while (node['return']) { |
| 5382 | node = node['return']; |
| 5383 | } |
| 5384 | } |
| 5385 | if (node.tag === HostRoot) { |
| 5386 | // TODO: Check if this was a nested HostRoot when used with |
| 5387 | // renderContainerIntoSubtree. |
| 5388 | return MOUNTED; |
| 5389 | } |
| 5390 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 5391 | // that has been unmounted. |
| 5392 | return UNMOUNTED; |
| 5393 | } |
| 5394 | |
| 5395 | function isFiberMounted(fiber) { |
| 5396 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected