@ -208,30 +208,28 @@ export function batch_inspect(target, prop, receiver) {
export function check _dirtiness ( reaction ) {
var flags = reaction . f ;
var is _dirty = ( flags & DIRTY ) !== 0 ;
var is _unowned = ( flags & UNOWNED ) !== 0 ;
// If we are unowned, we still need to ensure that we update our version to that
// of our dependencies.
if ( is _dirty && ! is _unowned ) {
if ( is _dirty ) {
return true ;
}
var is _unowned = ( flags & UNOWNED ) !== 0 ;
var is _disconnected = ( flags & DISCONNECTED ) !== 0 ;
if ( ( flags & MAYBE _DIRTY ) !== 0 || ( is _dirty && is _unowned ) ) {
if ( ( flags & MAYBE _DIRTY ) !== 0 ) {
var dependencies = reaction . deps ;
if ( dependencies !== null ) {
var length = dependencies . length ;
var is _equal ;
var reactions ;
for ( var i = 0 ; i < length ; i ++ ) {
var dependency = dependencies [ i ] ;
if ( ! is _dirty && check _dirtiness ( /** @type {import('#client').Derived} */ ( dependency ) ) ) {
is_equal = update_derived ( /** @type {import('#client').Derived} **/ ( dependency ) , true ) ;
update_derived ( /** @type {import('#client').Derived} **/ ( dependency ) , true ) ;
}
var version = dependency . version ;
if ( is _unowned ) {
@ -239,21 +237,15 @@ export function check_dirtiness(reaction) {
// if our dependency write version is higher. If it is then we can assume
// that state has changed to a newer version and thus this unowned signal
// is also dirty.
if ( version > /** @type {import('#client').Derived} */ ( reaction ) . version ) {
return ! is _equal ;
return true ;
}
if ( ! current _skip _reaction && ! dependency ? . reactions ? . includes ( reaction ) ) {
// If we are working with an unowned signal as part of an effect (due to !current_skip_reaction)
// and the version hasn't changed, we still need to check that this reaction
// if linked to the dependency source – otherwise future updates will not be caught.
reactions = dependency . reactions ;
if ( reactions === null ) {
dependency . reactions = [ reaction ] ;
} else {
reactions . push ( reaction ) ;
}
( dependency . reactions ? ? = [ ] ) . push ( reaction ) ;
}
} else if ( ( reaction . f & DIRTY ) !== 0 ) {
// `signal` might now be dirty, as a result of calling `check_dirtiness` and/or `update_derived`