fix: better handling of empty text node hydration

pull/10545/head
Dominic Gannaway 3 years ago
parent fa3d118550
commit 3a77034c32

@ -230,7 +230,7 @@ export function space(anchor) {
// text node to hydrate (or an anchor comment is falsely detected instead) // text node to hydrate (or an anchor comment is falsely detected instead)
// — we must therefore create one // — we must therefore create one
if (hydrating && anchor.nodeType !== 3) { if (hydrating && anchor.nodeType !== 3) {
const node = empty() const node = empty();
anchor.before(node); anchor.before(node);
return node; return node;
} }

Loading…
Cancel
Save