SIGN IN SIGN UP
sveltejs / svelte UNCLAIMED

web development for the rest of us

0 0 70 JavaScript

fix: make unnecessary commit work less likely (#18263)

While looking at
https://github.com/sveltejs/svelte/issues/18221#issuecomment-4497918414
and trying to understand how the invariant can happen I noticed that we
are not correctly filtering during commit.
- we were not ignoring deriveds
- we were not comparing the correct values (checking `source.v` instead
of the saved value) and not checking if their "is a derived" state
differs

I'm not able to come up with a test where something fails without these
(possibly because it's more about an optimization to do less reruns and
not about correctness) fixes, but they do make sense.
S
Simon H committed
4656e6895dde764e99c01d9dd86379df2c881c8a
Parent: 91a42e2
Committed by GitHub <noreply@github.com> on 5/21/2026, 6:26:09 PM