(fiber)
| 5113 | var UNMOUNTED = 3; |
| 5114 | |
| 5115 | function isFiberMountedImpl(fiber) { |
| 5116 | var node = fiber; |
| 5117 | if (!fiber.alternate) { |
| 5118 | // If there is no alternate, this might be a new tree that isn't inserted |
| 5119 | // yet. If it is, then it will have a pending insertion effect on it. |
| 5120 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5121 | return MOUNTING; |
| 5122 | } |
| 5123 | while (node['return']) { |
| 5124 | node = node['return']; |
| 5125 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5126 | return MOUNTING; |
| 5127 | } |
| 5128 | } |
| 5129 | } else { |
| 5130 | while (node['return']) { |
| 5131 | node = node['return']; |
| 5132 | } |
| 5133 | } |
| 5134 | if (node.tag === HostRoot) { |
| 5135 | // TODO: Check if this was a nested HostRoot when used with |
| 5136 | // renderContainerIntoSubtree. |
| 5137 | return MOUNTED; |
| 5138 | } |
| 5139 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 5140 | // that has been unmounted. |
| 5141 | return UNMOUNTED; |
| 5142 | } |
| 5143 | |
| 5144 | function isFiberMounted(fiber) { |
| 5145 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected