Skip to content

Commit f313637

Browse files
committed
fix: esnure resuming effects works correctly with unowned dependencies
1 parent 300fc5b commit f313637

File tree

1 file changed

+10
-3
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+10
-3
lines changed

packages/svelte/src/internal/client/reactivity/sources.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import {
1616
check_dirtiness,
1717
set_is_flushing_effect,
1818
is_flushing_effect,
19-
untracking
19+
untracking,
20+
set_active_reaction
2021
} from '../runtime.js';
2122
import { equals, safe_equals } from './equality.js';
2223
import {
@@ -211,8 +212,14 @@ export function internal_set(source, value) {
211212
if ((effect.f & CLEAN) !== 0) {
212213
set_signal_status(effect, MAYBE_DIRTY);
213214
}
214-
if (check_dirtiness(effect)) {
215-
update_effect(effect);
215+
var previous_reaction = active_reaction;
216+
try {
217+
set_active_reaction(effect);
218+
if (check_dirtiness(effect)) {
219+
update_effect(effect);
220+
}
221+
} finally {
222+
set_active_reaction(previous_reaction);
216223
}
217224
}
218225
} finally {

0 commit comments

Comments
 (0)