svelte: Svelte 5: Incorrect Server Output for `$effect.root`
Describe the bug
On the server, $effect.root should return a noop function, but it returns undefined because the function is immediately invoked.
Reproduction
Logs
No response
System Info
Safari 17.4 iOS
Severity
annoyance
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- fix: ensure `$effect.root` is handled correctly on the server - should return a callback function, always (which means it may need a fallback noop function) - should invoke the cleanup function on co... — committed to sveltejs/svelte by dummdidumm 2 years ago
- fix: ensure `$effect.root` is ignored on the server Ignore the contents of the effect root, just return a noop where necessary fixes #12322 — committed to sveltejs/svelte by dummdidumm 2 years ago
- fix: ensure `$effect.root` is ignored on the server (#12332) Ignore the contents of the effect root, just return a noop where necessary fixes #12322 — committed to sveltejs/svelte by dummdidumm 2 years ago
can confirm it, behaviour changed in 175. 174 still returns a function