mirror of https://github.com/sveltejs/svelte
fix: hydrate multiple `<svelte:head>` elements correctly (#12475)
The head hydration anchor didn't update after hydrating the contents of one `<svelte:head>` element, which meant subsequent `<svelte:head>` elements would always start at the beginning of the head. This PR fixes that. The test was updated such that the shape of each `<svelte:head>` content is sufficiently different to throw an error if this wasn't fixed. fixes #12458pull/12478/head
parent
4fd6d29227
commit
bc9907aa1c
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: hydrate multiple `<svelte:head>` elements correctly
|
@ -1,2 +1,2 @@
|
||||
{@html '<meta name="head_nested_html" content="head_nested_html">'}
|
||||
<meta name="head_nested" content="head_nested">
|
||||
<meta name="head_nested" content="head_nested" />
|
||||
|
@ -1,5 +1,9 @@
|
||||
<script>
|
||||
let text = $state('foo');
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
{@html '<meta name="nested_html" content="nested_html">'}
|
||||
<meta name="nested" content="nested">
|
||||
<meta name="nested" content="nested" />
|
||||
<meta name="foo" content={text} />
|
||||
</svelte:head>
|
||||
|
Loading…
Reference in new issue