(returnFiber, currentFirstChild, portal, expirationTime)
| 9728 | } |
| 9729 | |
| 9730 | function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { |
| 9731 | var key = portal.key; |
| 9732 | var child = currentFirstChild; |
| 9733 | while (child !== null) { |
| 9734 | // TODO: If key === null and child.key === null, then this only applies to |
| 9735 | // the first item in the list. |
| 9736 | if (child.key === key) { |
| 9737 | if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { |
| 9738 | deleteRemainingChildren(returnFiber, child.sibling); |
| 9739 | var existing = useFiber(child, portal.children || [], expirationTime); |
| 9740 | existing['return'] = returnFiber; |
| 9741 | return existing; |
| 9742 | } else { |
| 9743 | deleteRemainingChildren(returnFiber, child); |
| 9744 | break; |
| 9745 | } |
| 9746 | } else { |
| 9747 | deleteChild(returnFiber, child); |
| 9748 | } |
| 9749 | child = child.sibling; |
| 9750 | } |
| 9751 | |
| 9752 | var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); |
| 9753 | created['return'] = returnFiber; |
| 9754 | return created; |
| 9755 | } |
| 9756 | |
| 9757 | // This API will tag the children with the side-effect of the reconciliation |
| 9758 | // itself. They will be added to the side-effect list as we pass through the |
no test coverage detected