fix: reset dependency read versions after reaction execution

pull/14964/head
Dominic Gannaway 2 years ago
parent 387aa469b3
commit b6669fa6e0

@ -429,7 +429,11 @@ export function update_reaction(reaction) {
if (!skip_reaction) { if (!skip_reaction) {
(dep.reactions ??= []).push(reaction); (dep.reactions ??= []).push(reaction);
} }
// Reset read version back to 0 // Reset read version back to 0, otherwise if we are
// returning to an existing reaction from before then
// and it uses this depedency too then it will be the
// same read version as the current global read version
// and not correctly be added as a dependency
dep.rv = 0; dep.rv = 0;
} }
} else if (deps !== null && skipped_deps < deps.length) { } else if (deps !== null && skipped_deps < deps.length) {

Loading…
Cancel
Save