Skip to content

Commit a26b779

Browse files
committed
simplify
1 parent ecb8768 commit a26b779

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ export function spread_props(...props) {
254254
* @param {() => T} fn
255255
* @returns {T}
256256
*/
257-
function with_parent_branch(fn) {
257+
function with_parent_tracking_context(fn) {
258258
var effect = active_effect;
259259
var previous_effect = active_effect;
260260
var previous_reaction = active_reaction;
@@ -290,7 +290,7 @@ export function prop(props, key, flags, fallback) {
290290
var is_store_sub = false;
291291
var prop_value;
292292

293-
with_parent_branch(() => {
293+
with_parent_tracking_context(() => {
294294
if (bindable) {
295295
[prop_value, is_store_sub] = capture_store_binding(() => /** @type {V} */ (props[key]));
296296
} else {
@@ -331,7 +331,7 @@ export function prop(props, key, flags, fallback) {
331331
e.props_invalid_value(key);
332332
}
333333

334-
prop_value = get_fallback();
334+
prop_value = with_parent_tracking_context(get_fallback);
335335
if (setter) setter(prop_value);
336336
}
337337

0 commit comments

Comments
 (0)