@ -1,6 +1,6 @@
/** @import { Derived, Effect, Reaction, Source, Value } from '#client' */
import { DEV } from 'esm-env' ;
import { get _descriptors , get _prototype _of , in dex_of } from '../shared/utils.js' ;
import { get _descriptors , get _prototype _of , in cludes, in dex_of } from '../shared/utils.js' ;
import {
destroy _block _effect _children ,
destroy _effect _children ,
@ -192,7 +192,7 @@ function schedule_possible_effect_self_invalidation(signal, effect, root = true)
var reactions = signal . reactions ;
if ( reactions === null ) return ;
if ( ! async _mode _flag && current _sources ? . includes ( signal ) ) {
if ( ! async _mode _flag && current _sources !== null && includes . call ( current _sources , signal ) ) {
return ;
}
@ -371,7 +371,7 @@ function remove_reaction(signal, dependency) {
// Destroying a child effect while updating a parent effect can cause a dependency to appear
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
( new _deps === null || ! new_deps . includes ( dependency ) )
( new _deps === null || ! includes. call ( new _deps , dependency ) )
) {
var derived = /** @type {Derived} */ ( dependency ) ;
@ -514,7 +514,7 @@ export function get(signal) {
// we don't add the dependency, because that would create a memory leak
var destroyed = active _effect !== null && ( active _effect . f & DESTROYED ) !== 0 ;
if ( ! destroyed && ! current _sources ? . includes ( signal ) ) {
if ( ! destroyed && ( current _sources === null || ! includes . call ( current _sources , signal ) ) ) {
var deps = active _reaction . deps ;
if ( ( active _reaction . f & REACTION _IS _UPDATING ) !== 0 ) {
@ -542,7 +542,7 @@ export function get(signal) {
if ( reactions === null ) {
signal . reactions = [ active _reaction ] ;
} else if ( ! reactions. includes ( active _reaction ) ) {
} else if ( ! includes. call ( reactions , active _reaction ) ) {
reactions . push ( active _reaction ) ;
}
}