(returnFiber, currentFirstChild, portal, expirationTime)
| 9590 | } |
| 9591 | |
| 9592 | function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { |
| 9593 | var key = portal.key; |
| 9594 | var child = currentFirstChild; |
| 9595 | while (child !== null) { |
| 9596 | // TODO: If key === null and child.key === null, then this only applies to |
| 9597 | // the first item in the list. |
| 9598 | if (child.key === key) { |
| 9599 | if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { |
| 9600 | deleteRemainingChildren(returnFiber, child.sibling); |
| 9601 | var existing = useFiber(child, portal.children || [], expirationTime); |
| 9602 | existing['return'] = returnFiber; |
| 9603 | return existing; |
| 9604 | } else { |
| 9605 | deleteRemainingChildren(returnFiber, child); |
| 9606 | break; |
| 9607 | } |
| 9608 | } else { |
| 9609 | deleteChild(returnFiber, child); |
| 9610 | } |
| 9611 | child = child.sibling; |
| 9612 | } |
| 9613 | |
| 9614 | var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); |
| 9615 | created['return'] = returnFiber; |
| 9616 | return created; |
| 9617 | } |
| 9618 | |
| 9619 | // This API will tag the children with the side-effect of the reconciliation |
| 9620 | // itself. They will be added to the side-effect list as we pass through the |
no test coverage detected