mirror of https://github.com/sveltejs/svelte
fix: $state.eager() is sometimes incorrect in SSR (#18530)
Fix #18529 A simple fix : `context.visit()` was missing on the argument of `$state.eager()`, so the generated code can be incorrect in some case :pull/18497/head
parent
199ffebca3
commit
a4fd67e361
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: ensure `$state.eager()` is correctly transormed for SSR output
|
||||||
@ -0,0 +1,2 @@
|
|||||||
|
<div>value=0</div>
|
||||||
|
<div>eager=0</div>
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
<script>
|
||||||
|
let props = $props();
|
||||||
|
const value = $derived(props.number ?? 0);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div>value={value}</div>
|
||||||
|
<div>eager={$state.eager(value)}</div>
|
||||||
Loading…
Reference in new issue