Skip to content

Commit 43dc147

Browse files
committed
tweak other names too
1 parent d1104f6 commit 43dc147

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { safe_equals } from './equality.js';
2323
import * as e from '../errors.js';
2424
import { BRANCH_EFFECT, DESTROYED, LEGACY_DERIVED_PROP, ROOT_EFFECT } from '../constants.js';
2525
import { proxy } from '../proxy.js';
26-
import { capture_marked_store_sub } from './store.js';
26+
import { capture_store_binding } from './store.js';
2727

2828
/**
2929
* @param {((value?: number) => number)} fn
@@ -278,7 +278,7 @@ export function prop(props, key, flags, fallback) {
278278
var prop_value;
279279

280280
if (bindable) {
281-
[prop_value, is_store_sub] = capture_marked_store_sub(() => /** @type {V} */ (props[key]));
281+
[prop_value, is_store_sub] = capture_store_binding(() => /** @type {V} */ (props[key]));
282282
} else {
283283
prop_value = /** @type {V} */ (props[key]);
284284
}

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { mutable_source, set } from './sources.js';
1111
* `<Child bind:x={$y} />`. If it is, we treat the prop as mutable even in
1212
* runes mode, and skip `binding_property_non_reactive` validation
1313
*/
14-
let marked_store_sub = false;
14+
let is_store_binding = false;
1515

1616
/**
1717
* Gets the current value of a store. If the store isn't subscribed to yet, it will create a proxy
@@ -158,7 +158,7 @@ export function update_pre_store(store, store_value, d = 1) {
158158
* Called inside prop getters to communicate that the prop is a store binding
159159
*/
160160
export function mark_store_binding() {
161-
marked_store_sub = true;
161+
is_store_binding = true;
162162
}
163163

164164
/**
@@ -169,13 +169,13 @@ export function mark_store_binding() {
169169
* @param {() => T} fn
170170
* @returns {[T, boolean]}
171171
*/
172-
export function capture_marked_store_sub(fn) {
173-
var previous_marked_store_sub = marked_store_sub;
172+
export function capture_store_binding(fn) {
173+
var previous_is_store_binding = is_store_binding;
174174

175175
try {
176-
marked_store_sub = false;
177-
return [fn(), marked_store_sub];
176+
is_store_binding = false;
177+
return [fn(), is_store_binding];
178178
} finally {
179-
marked_store_sub = previous_marked_store_sub;
179+
is_store_binding = previous_is_store_binding;
180180
}
181181
}

packages/svelte/src/internal/client/validate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as e from './errors.js';
44
import { FILENAME } from '../../constants.js';
55
import { render_effect } from './reactivity/effects.js';
66
import * as w from './warnings.js';
7-
import { capture_marked_store_sub } from './reactivity/store.js';
7+
import { capture_store_binding } from './reactivity/store.js';
88

99
/** regex of all html void element names */
1010
const void_element_names =
@@ -85,7 +85,7 @@ export function validate_binding(binding, get_object, get_property, line, column
8585
render_effect(() => {
8686
if (warned) return;
8787

88-
var [object, is_store_sub] = capture_marked_store_sub(get_object);
88+
var [object, is_store_sub] = capture_store_binding(get_object);
8989

9090
if (is_store_sub) return;
9191

0 commit comments

Comments
 (0)