diff --git a/packages/html/hydrate.js b/packages/html/hydrate.js index 8656dbf..e06b7db 100644 --- a/packages/html/hydrate.js +++ b/packages/html/hydrate.js @@ -87,12 +87,15 @@ function firstDifference (a, b, path) { } // child nodes that matter for comparison: everything except -// whitespace-only text nodes +// whitespace-only text nodes and ' + const server = wrap.firstChild + const client = html`

hi

` + let reported = null + hydrate(server, client, { onMismatch: (d) => { reported = d } }) + assert.strictEqual(reported, null) +}) + test('mismatch detection is optional and hydrate still morphs without it', () => { const server = html`

old

` const client = html`

new

`