(fiber)
| 5206 | var UNMOUNTED = 3; |
| 5207 | |
| 5208 | function isFiberMountedImpl(fiber) { |
| 5209 | var node = fiber; |
| 5210 | if (!fiber.alternate) { |
| 5211 | // If there is no alternate, this might be a new tree that isn't inserted |
| 5212 | // yet. If it is, then it will have a pending insertion effect on it. |
| 5213 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5214 | return MOUNTING; |
| 5215 | } |
| 5216 | while (node['return']) { |
| 5217 | node = node['return']; |
| 5218 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5219 | return MOUNTING; |
| 5220 | } |
| 5221 | } |
| 5222 | } else { |
| 5223 | while (node['return']) { |
| 5224 | node = node['return']; |
| 5225 | } |
| 5226 | } |
| 5227 | if (node.tag === HostRoot) { |
| 5228 | // TODO: Check if this was a nested HostRoot when used with |
| 5229 | // renderContainerIntoSubtree. |
| 5230 | return MOUNTED; |
| 5231 | } |
| 5232 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 5233 | // that has been unmounted. |
| 5234 | return UNMOUNTED; |
| 5235 | } |
| 5236 | |
| 5237 | function isFiberMounted(fiber) { |
| 5238 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected