SIGN IN SIGN UP
sveltejs / svelte UNCLAIMED

web development for the rest of us

0 0 70 JavaScript

fix: unlink errored and otherwise finished batch (#18264)

This fixes the issue in
https://github.com/sveltejs/svelte/issues/18221#issuecomment-4497918414
where an error can create follup-up invariant errors. The batch errors,
has no chance to run otherwise (no more pending work) and is therefore
"dead". That means we need to unlink it otherwise it's becoming a
"zombie" and hangs around, causing unnecessary and potentially buggy (as
seen in the reproduction) merge/commit work.

I was not able to reduce the reproduction down to a test case that fails
without the fix, but it does make a related error test from #17888 work
more correctly.
S
Simon H committed
a6002b587c9d2f40fe2dc48391c372360abbaf0f
Parent: 4656e68
Committed by GitHub <noreply@github.com> on 5/21/2026, 6:26:47 PM