We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ffdcaa commit 1e19135Copy full SHA for 1e19135
packages/svelte/src/internal/client/dom/blocks/svelte-head.js
@@ -33,21 +33,10 @@ export function head(render_fn) {
33
head_anchor = /** @type {import('#client').TemplateNode} */ (document.head.firstChild);
34
}
35
36
- var depth = 0;
37
-
38
- while (head_anchor !== null) {
39
- if (head_anchor.nodeType === 8) {
40
- var data = /** @type {Comment} */ (head_anchor).data;
41
- if (data === HYDRATION_START) {
42
- if (depth === 0) {
43
- break;
44
- }
45
- depth++;
46
47
- if (data === HYDRATION_END) {
48
- depth--;
49
50
+ while (
+ head_anchor.nodeType !== 8 ||
+ /** @type {Comment} */ (head_anchor).data !== HYDRATION_START
+ ) {
51
head_anchor = /** @type {import('#client').TemplateNode} */ (head_anchor.nextSibling);
52
53
0 commit comments