(returnFiber, currentFirstChild, portal, expirationTime)
| 8951 | } |
| 8952 | |
| 8953 | function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { |
| 8954 | var key = portal.key; |
| 8955 | var child = currentFirstChild; |
| 8956 | while (child !== null) { |
| 8957 | // TODO: If key === null and child.key === null, then this only applies to |
| 8958 | // the first item in the list. |
| 8959 | if (child.key === key) { |
| 8960 | if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { |
| 8961 | deleteRemainingChildren(returnFiber, child.sibling); |
| 8962 | var existing = useFiber(child, portal.children || [], expirationTime); |
| 8963 | existing['return'] = returnFiber; |
| 8964 | return existing; |
| 8965 | } else { |
| 8966 | deleteRemainingChildren(returnFiber, child); |
| 8967 | break; |
| 8968 | } |
| 8969 | } else { |
| 8970 | deleteChild(returnFiber, child); |
| 8971 | } |
| 8972 | child = child.sibling; |
| 8973 | } |
| 8974 | |
| 8975 | var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); |
| 8976 | created['return'] = returnFiber; |
| 8977 | return created; |
| 8978 | } |
| 8979 | |
| 8980 | // This API will tag the children with the side-effect of the reconciliation |
| 8981 | // itself. They will be added to the side-effect list as we pass through the |
no test coverage detected