Skip to content

Commit cfdc519

Browse files
committed
fix head duplication with binding present
1 parent a1e60a3 commit cfdc519

File tree

1 file changed

+4
-0
lines changed
  • packages/svelte/src/compiler/compile/render_ssr

1 file changed

+4
-0
lines changed

packages/svelte/src/compiler/compile/render_ssr/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,13 @@ export default function ssr(component, options) {
144144
? b`
145145
let $$settled;
146146
let $$rendered;
147+
let #previous_head = $$result.head;
147148
148149
do {
149150
$$settled = true;
151+
// $$result.head is mutated by the literal expression
152+
// need to reset it if we're looping back to prevent duplication
153+
$$result.head = #previous_head;
150154
151155
${reactive_declarations}
152156

0 commit comments

Comments
 (0)