(node: RNode | null)
| 124 | * Validates that a given node has sibling nodes |
| 125 | */ |
| 126 | export function validateSiblingNodeExists(node: RNode | null): void { |
| 127 | validateNodeExists(node); |
| 128 | if (!node!.nextSibling) { |
| 129 | const header = 'During hydration Angular expected more sibling nodes to be present.\n\n'; |
| 130 | const actual = `Actual DOM is:\n\n${describeDomFromNode(node!)}\n\n`; |
| 131 | const footer = getHydrationErrorFooter(); |
| 132 | |
| 133 | const message = header + actual + footer; |
| 134 | |
| 135 | markRNodeAsHavingHydrationMismatch(node!, '', actual); |
| 136 | throw new RuntimeError(RuntimeErrorCode.HYDRATION_MISSING_SIBLINGS, message); |
| 137 | } |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * Validates that a node exists or throws |
no test coverage detected
searching dependent graphs…