-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
Describe the bug
If any stores are used in an async component, the $$cleanup
function gets injected in a different function than it's called.
<script>
import {writable} from 'svelte/store';
const store = writable('world');
await 'anything';
</script>
<h1>Hello {$store}!</h1>
$setup_stores
gets called inside the async $body function, but $$cleanup
goes in the actual component body.
Reproduction
Logs
$$cleanup is not defined in <unknown> in __wrapper.svelte
System Info
svelte 5.36.8 in playground
Severity
blocking an upgrade