From d2904b91ad08099a07cda10f14b157bc8e04f92a Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 10 Dec 2024 17:08:01 +0100 Subject: [PATCH] Add missing space in hydration mismatch message 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. ``` --- debug/src/debug.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug/src/debug.js b/debug/src/debug.js index c8c4085abf..30fdabb3e2 100644 --- a/debug/src/debug.js +++ b/debug/src/debug.js @@ -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)}` ); };