Skip to content

Commit

Permalink
fix(core): add newline to hydration mismatch error (#49965)
Browse files Browse the repository at this point in the history
This adds a newline after the hydration mismatch errors to provide more separation and readability.

PR Close #49965
  • Loading branch information
thePunderWoman authored and dylhunn committed Apr 24, 2023
1 parent bc9d0b7 commit 6d7be42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/hydration/error_handling.ts
Expand Up @@ -169,7 +169,7 @@ export function invalidSkipHydrationHost(rNode: RNode): Error {
'that doesn\'t act as a component host. Hydration can be ' +
'skipped only on per-component basis.\n\n';
const actual = `${describeDomFromNode(rNode)}\n\n`;
const footer = 'Please move the `ngSkipHydration` attribute to the component host element.';
const footer = 'Please move the `ngSkipHydration` attribute to the component host element.\n\n';
const message = header + actual + footer;
return new RuntimeError(RuntimeErrorCode.INVALID_SKIP_HYDRATION_HOST, message);
}
Expand Down Expand Up @@ -366,7 +366,7 @@ function getHydrationErrorFooter(componentClassName?: string): string {
return `To fix this problem:\n` +
` * check ${componentInfo} component for hydration-related issues\n` +
` * or skip hydration by adding the \`ngSkipHydration\` attribute ` +
`to its host node in a template`;
`to its host node in a template\n\n`;
}

/**
Expand Down

0 comments on commit 6d7be42

Please sign in to comment.