@@ -12,7 +12,6 @@ import { mutable_source, set, source } from './sources.js';
12
12
import { derived , derived_safe_equal } from './deriveds.js' ;
13
13
import {
14
14
active_effect ,
15
- active_reaction ,
16
15
get ,
17
16
is_signals_recorded ,
18
17
set_active_effect ,
@@ -21,7 +20,7 @@ import {
21
20
} from '../runtime.js' ;
22
21
import { safe_equals } from './equality.js' ;
23
22
import * as e from '../errors.js' ;
24
- import { BRANCH_EFFECT , DESTROYED , LEGACY_DERIVED_PROP , ROOT_EFFECT } from '../constants.js' ;
23
+ import { BRANCH_EFFECT , LEGACY_DERIVED_PROP , ROOT_EFFECT } from '../constants.js' ;
25
24
import { proxy } from '../proxy.js' ;
26
25
import { capture_store_binding } from './store.js' ;
27
26
@@ -369,17 +368,12 @@ export function prop(props, key, flags, fallback) {
369
368
// The derived returns the current value. The underlying mutable
370
369
// source is written to from various places to persist this value.
371
370
var inner_current_value = mutable_source ( prop_value ) ;
372
-
373
371
var current_value = with_parent_branch ( ( ) =>
374
372
derived ( ( ) => {
375
373
var parent_value = getter ( ) ;
376
374
var child_value = get ( inner_current_value ) ;
377
- var current_derived = /** @type {Derived } */ ( active_reaction ) ;
378
375
379
- // If the getter from the parent returns undefined, switch
380
- // to using the local value from inner_current_value instead,
381
- // as the parent value might have been torn down
382
- if ( from_child || ( parent_value === undefined && ( current_derived . f & DESTROYED ) !== 0 ) ) {
376
+ if ( from_child ) {
383
377
from_child = false ;
384
378
was_from_child = true ;
385
379
return child_value ;
0 commit comments