File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
packages/svelte/src/internal/client Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,13 @@ export const EFFECT_TRANSPARENT = 1 << 16;
1818export const INSPECT_EFFECT = 1 << 17 ;
1919export const HEAD_EFFECT = 1 << 18 ;
2020export const EFFECT_PRESERVED = 1 << 19 ;
21- export const EFFECT_IS_UPDATING = 1 << 20 ;
22- export const USER_EFFECT = 1 << 21 ;
21+ export const USER_EFFECT = 1 << 20 ;
2322
2423// Flags used for async
25- export const REACTION_IS_UPDATING = 1 << 22 ;
26- export const EFFECT_ASYNC = 1 << 23 ;
24+ export const REACTION_IS_UPDATING = 1 << 21 ;
25+ export const EFFECT_ASYNC = 1 << 22 ;
2726
28- export const ERROR_VALUE = 1 << 24 ;
27+ export const ERROR_VALUE = 1 << 23 ;
2928
3029export const STATE_SYMBOL = Symbol ( '$state' ) ;
3130export const LEGACY_PROPS = Symbol ( 'legacy props' ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
1919 ROOT_EFFECT ,
2020 DISCONNECTED ,
2121 REACTION_IS_UPDATING ,
22- EFFECT_IS_UPDATING ,
2322 STALE_REACTION ,
2423 ERROR_VALUE
2524} from './constants.js' ;
@@ -94,7 +93,7 @@ export let source_ownership = null;
9493
9594/** @param {Value } value */
9695export function push_reaction_value ( value ) {
97- if ( active_reaction !== null && active_reaction . f & EFFECT_IS_UPDATING ) {
96+ if ( active_reaction !== null && ( ! async_mode_flag || ( active_reaction . f & DERIVED ) !== 0 ) ) {
9897 if ( source_ownership === null ) {
9998 source_ownership = { reaction : active_reaction , sources : [ value ] } ;
10099 } else {
@@ -287,10 +286,6 @@ export function update_reaction(reaction) {
287286 untracking = false ;
288287 read_version ++ ;
289288
290- if ( ! async_mode_flag || ( reaction . f & DERIVED ) !== 0 ) {
291- reaction . f |= EFFECT_IS_UPDATING ;
292- }
293-
294289 if ( reaction . ac !== null ) {
295290 reaction . ac . abort ( STALE_REACTION ) ;
296291 reaction . ac = null ;
@@ -381,10 +376,6 @@ export function update_reaction(reaction) {
381376 source_ownership = previous_reaction_sources ;
382377 set_component_context ( previous_component_context ) ;
383378 untracking = previous_untracking ;
384-
385- if ( ! async_mode_flag || ( reaction . f & DERIVED ) !== 0 ) {
386- reaction . f ^= EFFECT_IS_UPDATING ;
387- }
388379 }
389380}
390381
You can’t perform that action at this time.
0 commit comments