MCPcopy Index your code
hub / github.com/angular/angular / validateSiblingNodeExists

Function validateSiblingNodeExists

packages/core/src/hydration/error_handling.ts:126–138  ·  view source on GitHub ↗
(node: RNode | null)

Source from the content-addressed store, hash-verified

124 * Validates that a given node has sibling nodes
125 */
126export 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

Callers 2

siblingAfterFunction · 0.90
removeDehydratedViewFunction · 0.90

Calls 4

validateNodeExistsFunction · 0.85
describeDomFromNodeFunction · 0.85
getHydrationErrorFooterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…