Skip to content

Commit 9da4927

Browse files
committed
tidy up
1 parent 763ed35 commit 9da4927

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/svelte/src/internal/client/runtime.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ let is_flushing = false;
5050
/** @type {Effect | null} */
5151
let last_scheduled_effect = null;
5252

53-
export let is_flushing_effect = false; // TODO do we still need this?
53+
let is_updating_effect = false;
54+
5455
export let is_destroying_effect = false;
5556

5657
/** @param {boolean} value */
@@ -401,7 +402,7 @@ export function update_reaction(reaction) {
401402
active_reaction = (flags & (BRANCH_EFFECT | ROOT_EFFECT)) === 0 ? reaction : null;
402403
skip_reaction =
403404
(flags & UNOWNED) !== 0 &&
404-
(!is_flushing_effect || previous_reaction === null || previous_untracking);
405+
(!is_updating_effect || previous_reaction === null || previous_untracking);
405406

406407
derived_sources = null;
407408
set_component_context(reaction.ctx);
@@ -547,10 +548,10 @@ export function update_effect(effect) {
547548

548549
var previous_effect = active_effect;
549550
var previous_component_context = component_context;
550-
var previously_flushing_effect = is_flushing_effect;
551+
var was_updating_effect = is_updating_effect;
551552

552553
active_effect = effect;
553-
is_flushing_effect = true;
554+
is_updating_effect = true;
554555

555556
if (DEV) {
556557
var previous_component_fn = dev_current_component_function;
@@ -592,7 +593,7 @@ export function update_effect(effect) {
592593
} catch (error) {
593594
handle_error(error, effect, previous_effect, previous_component_context || effect.ctx);
594595
} finally {
595-
is_flushing_effect = previously_flushing_effect;
596+
is_updating_effect = was_updating_effect;
596597
active_effect = previous_effect;
597598

598599
if (DEV) {

0 commit comments

Comments
 (0)