(fiber)
| 5251 | var UNMOUNTED = 3; |
| 5252 | |
| 5253 | function isFiberMountedImpl(fiber) { |
| 5254 | var node = fiber; |
| 5255 | if (!fiber.alternate) { |
| 5256 | // If there is no alternate, this might be a new tree that isn't inserted |
| 5257 | // yet. If it is, then it will have a pending insertion effect on it. |
| 5258 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5259 | return MOUNTING; |
| 5260 | } |
| 5261 | while (node['return']) { |
| 5262 | node = node['return']; |
| 5263 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5264 | return MOUNTING; |
| 5265 | } |
| 5266 | } |
| 5267 | } else { |
| 5268 | while (node['return']) { |
| 5269 | node = node['return']; |
| 5270 | } |
| 5271 | } |
| 5272 | if (node.tag === HostRoot) { |
| 5273 | // TODO: Check if this was a nested HostRoot when used with |
| 5274 | // renderContainerIntoSubtree. |
| 5275 | return MOUNTED; |
| 5276 | } |
| 5277 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 5278 | // that has been unmounted. |
| 5279 | return UNMOUNTED; |
| 5280 | } |
| 5281 | |
| 5282 | function isFiberMounted(fiber) { |
| 5283 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected