File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ import {
1111 untrack ,
1212 increment_write_version ,
1313 update_effect ,
14+ reaction_sources ,
15+ set_reaction_sources ,
1416 check_dirtiness ,
1517 untracking ,
16- is_destroying_effect ,
17- reaction_sources ,
18- set_reaction_sources
18+ is_destroying_effect
1919} from '../runtime.js' ;
2020import { equals , safe_equals } from './equality.js' ;
2121import {
@@ -28,7 +28,6 @@ import {
2828 MAYBE_DIRTY ,
2929 BLOCK_EFFECT ,
3030 ROOT_EFFECT ,
31- EFFECT ,
3231 EFFECT_IS_UPDATING
3332} from '../constants.js' ;
3433import * as e from '../errors.js' ;
Original file line number Diff line number Diff line change @@ -82,6 +82,11 @@ export function set_active_reaction(reaction) {
8282/** @type {null | Effect } */
8383export let active_effect = null ;
8484
85+ /** @param {null | Effect } effect */
86+ export function set_active_effect ( effect ) {
87+ active_effect = effect ;
88+ }
89+
8590/**
8691 * When sources are created within a derived, we record them so that we can safely allow
8792 * local mutations to these sources without the side-effect error being invoked unnecessarily.
@@ -96,11 +101,6 @@ export function set_reaction_sources(sources) {
96101 reaction_sources = sources ;
97102}
98103
99- /** @param {null | Effect } effect */
100- export function set_active_effect ( effect ) {
101- active_effect = effect ;
102- }
103-
104104/**
105105 * The dependencies of the reaction that is currently being executed. In many cases,
106106 * the dependencies are unchanged between runs, and so this will be `null` unless
You can’t perform that action at this time.
0 commit comments