You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When starting from SSR generated HTML with hydratable: true, hydration will remove the <title> element along with the other appropriate <head> elements, but will not add it back.
Expected behavior
The <title> should remain after hydration.
Stacktraces
None.
Information about your Svelte project:
Independent of browser.
Svelte 3.17.0+
Severity
Pretty bad.
Additional context
This was introduced in #4082. The compiled component sets document.title first and then later removes elements matching [data-svelte="svelte-..."], and so the title is lost. The simplest way to handle this would probably be to not add the special SSR attribute to the <title> element at all, since as of #4250 we don't need to worry about there being more than one of that anyway.
Describe the bug
When starting from SSR generated HTML with
hydratable: true
, hydration will remove the<title>
element along with the other appropriate<head>
elements, but will not add it back.Logs
None.
To Reproduce
https://github.com/johnmuhl/svelte-hydrate-head
Expected behavior
The
<title>
should remain after hydration.Stacktraces
None.
Information about your Svelte project:
Independent of browser.
Svelte 3.17.0+
Severity
Pretty bad.
Additional context
This was introduced in #4082. The compiled component sets
document.title
first and then later removes elements matching[data-svelte="svelte-..."]
, and so the title is lost. The simplest way to handle this would probably be to not add the special SSR attribute to the<title>
element at all, since as of #4250 we don't need to worry about there being more than one of that anyway.cc @johnmuhl @tanhauhau
The text was updated successfully, but these errors were encountered: