(returnFiber, currentFirstChild, portal, expirationTime)
| 14374 | } |
| 14375 | |
| 14376 | function reconcileSinglePortal(returnFiber, currentFirstChild, portal, expirationTime) { |
| 14377 | var key = portal.key; |
| 14378 | var child = currentFirstChild; |
| 14379 | |
| 14380 | while (child !== null) { |
| 14381 | // TODO: If key === null and child.key === null, then this only applies to |
| 14382 | // the first item in the list. |
| 14383 | if (child.key === key) { |
| 14384 | if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) { |
| 14385 | deleteRemainingChildren(returnFiber, child.sibling); |
| 14386 | var existing = useFiber(child, portal.children || []); |
| 14387 | existing.return = returnFiber; |
| 14388 | return existing; |
| 14389 | } else { |
| 14390 | deleteRemainingChildren(returnFiber, child); |
| 14391 | break; |
| 14392 | } |
| 14393 | } else { |
| 14394 | deleteChild(returnFiber, child); |
| 14395 | } |
| 14396 | |
| 14397 | child = child.sibling; |
| 14398 | } |
| 14399 | |
| 14400 | var created = createFiberFromPortal(portal, returnFiber.mode, expirationTime); |
| 14401 | created.return = returnFiber; |
| 14402 | return created; |
| 14403 | } // This API will tag the children with the side-effect of the reconciliation |
| 14404 | // itself. They will be added to the side-effect list as we pass through the |
| 14405 | // children and the parent. |
| 14406 |
no test coverage detected