File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -179,17 +179,17 @@ export function teardown(fn) {
179179export function user_effect ( fn ) {
180180 validate_effect ( '$effect' ) ;
181181
182- // Non-nested `$effect(...)` in a component should be deferred
183- // until the component is mounted
184- var defer =
185- active_effect !== null && ( active_effect . f & BRANCH_EFFECT ) !== 0 && active_reaction === null ;
186-
187182 if ( DEV ) {
188183 define_property ( fn , 'name' , {
189184 value : '$effect'
190185 } ) ;
191186 }
192187
188+ // Non-nested `$effect(...)` in a component should be deferred
189+ // until the component is mounted
190+ var defer =
191+ active_effect !== null && ( active_effect . f & BRANCH_EFFECT ) !== 0 && active_reaction === null ;
192+
193193 if ( defer ) {
194194 var context = /** @type {ComponentContext } */ ( component_context ) ;
195195 ( context . e ??= [ ] ) . push ( fn ) ;
You can’t perform that action at this time.
0 commit comments