Skip to content

Commit bb8ee97

Browse files
committed
shuffle
1 parent 5528327 commit bb8ee97

File tree

1 file changed

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

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,17 @@ export function teardown(fn) {
179179
export 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);

0 commit comments

Comments
 (0)