Skip to content

Commit 29f51b5

Browse files
committed
preserve $: label in reactive blocks in SSR mode (sveltejs#2828)
1 parent afb4158 commit 29f51b5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/compile/render_ssr/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ export default function ssr(
9898
: b`
9999
let ${left} = ${right}`;
100100
}
101+
} else { // TODO do not add label if it's not referenced
102+
statement = b`$: { ${statement} }`;
101103
}
102104

103105
return statement;

0 commit comments

Comments
 (0)