incremental-batches
Rich Harris 3 weeks ago
parent 6d835a00fb
commit 8332bb32a2

@ -1173,6 +1173,7 @@ function mark_effects(batch, value, sources, marked, checked) {
if ((flags & DERIVED) !== 0) {
batch.current.delete(/** @type {Derived} */ (reaction));
batch.cvs.set(/** @type {Derived} */ (reaction), -1);
mark_effects(batch, /** @type {Derived} */ (reaction), sources, marked, checked);
} else if ((flags & (ASYNC | BLOCK_EFFECT)) !== 0 && depends_on(reaction, sources, checked)) {

@ -402,7 +402,7 @@ export function update_derived(derived) {
if (!derived.equals(value)) {
if (active_batch !== null) {
active_batch.capture(derived, value, write_version);
(current_batch ?? active_batch).capture(derived, value, write_version);
// We also write to previous_batch because if it exists, it is a sign that we're
// currently in the process of flushing effects. These updates to deriveds may belong

Loading…
Cancel
Save