* Skip over some sibling nodes during hydration. * * Note: we use this instead of `siblingAfter` as it's expected that * sometimes we might encounter null nodes. In those cases, we want to * defer to downstream error handling to provide proper context.
(state: I18nHydrationState, skip: number)
| 386 | * defer to downstream error handling to provide proper context. |
| 387 | */ |
| 388 | function skipSiblingNodes(state: I18nHydrationState, skip: number) { |
| 389 | let currentNode = state.currentNode; |
| 390 | for (let i = 0; i < skip; i++) { |
| 391 | if (!currentNode) { |
| 392 | break; |
| 393 | } |
| 394 | currentNode = currentNode?.nextSibling ?? null; |
| 395 | } |
| 396 | return currentNode; |
| 397 | } |
| 398 | |
| 399 | /** |
| 400 | * Fork the given state into a new state for hydrating children. |
no outgoing calls
no test coverage detected
searching dependent graphs…