@ -40,7 +40,7 @@ import { Boundary } from '../dom/blocks/boundary.js';
import { component _context } from '../context.js' ;
import { component _context } from '../context.js' ;
import { UNINITIALIZED } from '../../../constants.js' ;
import { UNINITIALIZED } from '../../../constants.js' ;
import { batch _values , current _batch } from './batch.js' ;
import { batch _values , current _batch } from './batch.js' ;
import { unset_context } from './async.js' ;
import { increment_pending , unset_context } from './async.js' ;
import { deferred , includes , noop } from '../../shared/utils.js' ;
import { deferred , includes , noop } from '../../shared/utils.js' ;
import { set _signal _status , update _derived _status } from './status.js' ;
import { set _signal _status , update _derived _status } from './status.js' ;
@ -111,8 +111,6 @@ export function async_derived(fn, label, location) {
e . async _derived _orphan ( ) ;
e . async _derived _orphan ( ) ;
}
}
var boundary = /** @type {Boundary} */ ( parent . b ) ;
var promise = /** @type {Promise<V>} */ ( /** @type {unknown} */ ( undefined ) ) ;
var promise = /** @type {Promise<V>} */ ( /** @type {unknown} */ ( undefined ) ) ;
var signal = source ( /** @type {V} */ ( UNINITIALIZED ) ) ;
var signal = source ( /** @type {V} */ ( UNINITIALIZED ) ) ;
@ -156,10 +154,7 @@ export function async_derived(fn, label, location) {
var batch = /** @type {Batch} */ ( current _batch ) ;
var batch = /** @type {Batch} */ ( current _batch ) ;
if ( should _suspend ) {
if ( should _suspend ) {
var blocking = boundary . is _rendered ( ) ;
var decrement _pending = increment _pending ( ) ;
boundary . update _pending _count ( 1 ) ;
batch . increment ( blocking ) ;
deferreds . get ( batch ) ? . reject ( STALE _REACTION ) ;
deferreds . get ( batch ) ? . reject ( STALE _REACTION ) ;
deferreds . delete ( batch ) ; // delete to ensure correct order in Map iteration below
deferreds . delete ( batch ) ; // delete to ensure correct order in Map iteration below
@ -208,9 +203,8 @@ export function async_derived(fn, label, location) {
}
}
}
}
if ( should _suspend ) {
if ( decrement _pending ) {
boundary . update _pending _count ( - 1 ) ;
decrement _pending ( ) ;
batch . decrement ( blocking ) ;
}
}
} ;
} ;