Skip to content

chore: remove unused EFFECT_IS_UPDATING constant #16317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/svelte/src/internal/client/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ export const EFFECT_TRANSPARENT = 1 << 16;
export const INSPECT_EFFECT = 1 << 17;
export const HEAD_EFFECT = 1 << 18;
export const EFFECT_PRESERVED = 1 << 19;
export const EFFECT_IS_UPDATING = 1 << 20;
export const USER_EFFECT = 1 << 21;
export const USER_EFFECT = 1 << 20;

export const STATE_SYMBOL = Symbol('$state');
export const LEGACY_PROPS = Symbol('legacy props');
Expand Down
7 changes: 1 addition & 6 deletions packages/svelte/src/internal/client/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import {
BLOCK_EFFECT,
ROOT_EFFECT,
DISCONNECTED,
EFFECT_IS_UPDATING,
STALE_REACTION,
USER_EFFECT
} from './constants.js';
Expand Down Expand Up @@ -94,7 +93,7 @@ export let source_ownership = null;

/** @param {Value} value */
export function push_reaction_value(value) {
if (active_reaction !== null && active_reaction.f & EFFECT_IS_UPDATING) {
if (active_reaction !== null) {
if (source_ownership === null) {
source_ownership = { reaction: active_reaction, sources: [value] };
} else {
Expand Down Expand Up @@ -282,8 +281,6 @@ export function update_reaction(reaction) {
untracking = false;
read_version++;

reaction.f |= EFFECT_IS_UPDATING;

if (reaction.ac !== null) {
reaction.ac.abort(STALE_REACTION);
reaction.ac = null;
Expand Down Expand Up @@ -368,8 +365,6 @@ export function update_reaction(reaction) {
source_ownership = previous_reaction_sources;
set_component_context(previous_component_context);
untracking = previous_untracking;

reaction.f ^= EFFECT_IS_UPDATING;
}
}

Expand Down