#18799·svelte

Async component initialization crashes when current_batch is null

Author: jkbz64Created Sep 8, 2026Updated Sep 9, 2026
### Describe the bug I've been getting random `Uncaught TypeError: can't access property "increment", batch is null` errors, I have no idea how that happens, my best guess is that an async component was mounted or destroyed while another update was still being processed, I can’t confirm the exact action that caused it so I tried to slop distill a reproduction and codex found a reproduction that reliably gets me the same error. My app extensively uses `mount` api to launch modals that use async inside so that can be related somehow. ### Reproduction This fails on Svelte [5.57.0](https://svelte.dev/playground/4769e36cae2e4e3c8eea2af97361af9f?version=5.57.0), #18558, and #18726. ```svelte

{value}

``` ```svelte (run = !run)}>run ``` ### Logs ```shell Uncaught TypeError: can't access property "increment", batch is null in $effect in App.svelte in __wrapper.svelte in undefined ``` ### System Info ```shell N/A ``` ### Severity annoyance