Skip to content

Commit

Permalink
Add missing space in hydration mismatch message
Browse files Browse the repository at this point in the history
The message reads something like this:

> Expected a DOM node of type p but found templateas available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.

It should read

> Expected a DOM node of type p but found template as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.

```diff
-Expected a DOM node of type p but found templateas available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.
+Expected a DOM node of type p but found template as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.
```
  • Loading branch information
sirreal authored Dec 10, 2024
1 parent 5c9625a commit d2904b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debug/src/debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,6 @@ options._hydrationMismatch = (newVNode, excessDomChildren) => {
.map(child => child && child.localName)
.filter(Boolean);
console.error(
`Expected a DOM node of type ${type} but found ${availableTypes.join(', ')}as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n${getOwnerStack(newVNode)}`
`Expected a DOM node of type ${type} but found ${availableTypes.join(', ')} as available DOM-node(s), this is caused by the SSR'd HTML containing different DOM-nodes compared to the hydrated one.\n\n${getOwnerStack(newVNode)}`
);
};

0 comments on commit d2904b9

Please sign in to comment.