restore capturing writes in internal_set that match the real value but not the batch's view

Needed on async-another-try-pt-2 (async-fork-write-back).
async-another-try-pt-1-prune
Rich Harris 2 days ago
parent deace209ff
commit 95f5c157db
No known key found for this signature in database

@ -36,7 +36,8 @@ import {
batch_values,
eager_block_effects,
schedule_effect,
legacy_updates
legacy_updates,
current_batch
} from './batch.js';
import { proxy } from '../proxy.js';
import { execute_derived } from './deriveds.js';
@ -270,6 +271,8 @@ export function internal_set(source, value, updated_during_traversal = null) {
if (!batch.is_fork && eager_effects.size > 0 && !eager_effects_deferred) {
flush_eager_effects();
}
} else if (batch_values?.has(source) && !source.equals(batch_values?.get(source))) {
current_batch?.capture(source, source.v);
}
return value;

Loading…
Cancel
Save