(returnFiber, currentFirstChild, portal, expirationTime)
| 9683 | } |
| 9684 | |
| 9685 | function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { |
| 9686 | var key = portal.key; |
| 9687 | var child = currentFirstChild; |
| 9688 | while (child !== null) { |
| 9689 | // TODO: If key === null and child.key === null, then this only applies to |
| 9690 | // the first item in the list. |
| 9691 | if (child.key === key) { |
| 9692 | if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { |
| 9693 | deleteRemainingChildren(returnFiber, child.sibling); |
| 9694 | var existing = useFiber(child, portal.children || [], expirationTime); |
| 9695 | existing['return'] = returnFiber; |
| 9696 | return existing; |
| 9697 | } else { |
| 9698 | deleteRemainingChildren(returnFiber, child); |
| 9699 | break; |
| 9700 | } |
| 9701 | } else { |
| 9702 | deleteChild(returnFiber, child); |
| 9703 | } |
| 9704 | child = child.sibling; |
| 9705 | } |
| 9706 | |
| 9707 | var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); |
| 9708 | created['return'] = returnFiber; |
| 9709 | return created; |
| 9710 | } |
| 9711 | |
| 9712 | // This API will tag the children with the side-effect of the reconciliation |
| 9713 | // itself. They will be added to the side-effect list as we pass through the |
no test coverage detected