(fiber)
| 5148 | var UNMOUNTED = 3; |
| 5149 | |
| 5150 | function isFiberMountedImpl(fiber) { |
| 5151 | var node = fiber; |
| 5152 | if (!fiber.alternate) { |
| 5153 | // If there is no alternate, this might be a new tree that isn't inserted |
| 5154 | // yet. If it is, then it will have a pending insertion effect on it. |
| 5155 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5156 | return MOUNTING; |
| 5157 | } |
| 5158 | while (node['return']) { |
| 5159 | node = node['return']; |
| 5160 | if ((node.effectTag & Placement) !== NoEffect) { |
| 5161 | return MOUNTING; |
| 5162 | } |
| 5163 | } |
| 5164 | } else { |
| 5165 | while (node['return']) { |
| 5166 | node = node['return']; |
| 5167 | } |
| 5168 | } |
| 5169 | if (node.tag === HostRoot) { |
| 5170 | // TODO: Check if this was a nested HostRoot when used with |
| 5171 | // renderContainerIntoSubtree. |
| 5172 | return MOUNTED; |
| 5173 | } |
| 5174 | // If we didn't hit the root, that means that we're in an disconnected tree |
| 5175 | // that has been unmounted. |
| 5176 | return UNMOUNTED; |
| 5177 | } |
| 5178 | |
| 5179 | function isFiberMounted(fiber) { |
| 5180 | return isFiberMountedImpl(fiber) === MOUNTED; |
no outgoing calls
no test coverage detected