-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
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