File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ import { tracing_mode_flag } from '../../flags/index.js';
3333import { Boundary } from '../dom/blocks/boundary.js' ;
3434import { component_context } from '../context.js' ;
3535import { UNINITIALIZED } from '../../../constants.js' ;
36- import { current_batch } from './batch.js' ;
36+ import { batch_deriveds , current_batch } from './batch.js' ;
3737
3838/** @type {Effect | null } */
3939export let current_async_effect = null ;
@@ -328,8 +328,12 @@ export function update_derived(derived) {
328328 // cleanup function, or it will cache a stale value
329329 if ( is_destroying_effect ) return ;
330330
331- var status =
332- ( skip_reaction || ( derived . f & UNOWNED ) !== 0 ) && derived . deps !== null ? MAYBE_DIRTY : CLEAN ;
331+ if ( batch_deriveds !== null ) {
332+ batch_deriveds . set ( derived , derived . v ) ;
333+ } else {
334+ var status =
335+ ( skip_reaction || ( derived . f & UNOWNED ) !== 0 ) && derived . deps !== null ? MAYBE_DIRTY : CLEAN ;
333336
334- set_signal_status ( derived , status ) ;
337+ set_signal_status ( derived , status ) ;
338+ }
335339}
You can’t perform that action at this time.
0 commit comments