Skip to content

Commit 1f82c82

Browse files
committed
kill code
1 parent cbf3b09 commit 1f82c82

File tree

1 file changed

+2
-8
lines changed
  • packages/svelte/src/internal/client/reactivity

1 file changed

+2
-8
lines changed

packages/svelte/src/internal/client/reactivity/props.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { mutable_source, set, source } from './sources.js';
1212
import { derived, derived_safe_equal } from './deriveds.js';
1313
import {
1414
active_effect,
15-
active_reaction,
1615
get,
1716
is_signals_recorded,
1817
set_active_effect,
@@ -21,7 +20,7 @@ import {
2120
} from '../runtime.js';
2221
import { safe_equals } from './equality.js';
2322
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';
2524
import { proxy } from '../proxy.js';
2625
import { capture_store_binding } from './store.js';
2726

@@ -369,17 +368,12 @@ export function prop(props, key, flags, fallback) {
369368
// The derived returns the current value. The underlying mutable
370369
// source is written to from various places to persist this value.
371370
var inner_current_value = mutable_source(prop_value);
372-
373371
var current_value = with_parent_branch(() =>
374372
derived(() => {
375373
var parent_value = getter();
376374
var child_value = get(inner_current_value);
377-
var current_derived = /** @type {Derived} */ (active_reaction);
378375

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) {
383377
from_child = false;
384378
was_from_child = true;
385379
return child_value;

0 commit comments

Comments
 (0)