(fiber)
| 4986 | var UNMOUNTED = 3; |
| 4987 | |
| 4988 | function isFiberMountedImpl(fiber) { |
| 4989 | var node = fiber; |
| 4990 | if (!fiber.alternate) { |
| 4991 | // If there is no alternate, this might be a new tree that isn't inserted |
| 4992 | // yet. If it is, then it will have a pending insertion effect on it. |
| 4993 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4994 | return MOUNTING; |
| 4995 | } |
| 4996 | while (node['return']) { |
| 4997 | node = node['return']; |
| 4998 | if ((node.effectTag & Placement) !== NoEffect) { |
| 4999 | return MOUNTING; |
| 5000 | } |
| 5001 | } |
| 5002 | } else { |
| 5003 | while (node['return']) { |
| 5004 | node = node['return']; |
| 5005 | } |
| 5006 | } |
| 5007 | if (node.tag === HostRoot) { |
| 5008 | // TODO: Check if this was a nested HostRoot when used with |
| 5009 | // renderContainerIntoSubtree. |
| 5010 | return MOUNTED; |
| 5011 | } |
| 5012 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 5013 | // that has been unmounted. |
| 5014 | return UNMOUNTED; |
| 5015 | } |
| 5016 | |
| 5017 | function isFiberMounted(fiber) { |
| 5018 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected